SlideShare a Scribd company logo
1 of 14
This work is licensed under the Apache 2.0 License
Kotlin Programming Language
Welcome to Android
Study Jams
Wi-Fi : Super1@dmin
This work is licensed under the Apache 2.0 License
Comments
Print Statement
The println() or print() function is used to output values/text.
SYNTAX :- print(“Welcome”)
println(“To The ASJ”)
Comments can be used to explain Kotlin code, and to make it more readable. It can also be used
to prevent execution when testing alternative code.
SYNTAX :- // This is how you write single line comments.
/* This is how you write multi-line comments. */
Variables
The general rule for Kotlin variables are:
● Names can contain letters, digits, underscores, and dollar signs
● Names should start with a letter
● Names can also begin with $ and _
● Names are case sensitive ("myVar" and "myvar" are different variables)
● Names should start with a lowercase letter and it cannot contain whitespace
● Reserved words (like Kotlin keywords, such as var or String) cannot be used as names
Variables are containers for storing data values.
SYNTAX :- var variableName = value
val variableName = value
Data Types
Different Types of data types are:
● Int (For Numbers)
● Double (For Decimal Numbers)
● Char (For Letters)
● Boolean (For True Or False)
● String (For a series of Characters)
myNum = 5
myDoubleNum = 10.
myLetter = ‘K’
myBoolean = true
myString = “Hello”
Operators
Booleans
SYNTAX :- val isKotlinFun : true
val isFishTasty : false
● Arithmetic Operators : + , - , * , / , % , ++ , –
● Assignment Operators : =
● Comparison Operators : == , != , > , < , >= , <=
● Logical Operators : && , || , !
Conditional Statements
● Use if to specify a block of code to be executed, if a specified condition
is true
● Use else to specify a block of code to be executed, if the same
condition is false
● Use else if to specify a new condition to test, if the first condition is
false
● Use when to specify many alternative blocks of code to be executed
SYNTAX :- if(condition){
// if condition is true execute
}
Loops
A Do While loop will execute the code block once, before checking the
condition is true, then it will repeat the loop until it’s true.
SYNTAX :- do{
Code block to be executed
}
while(condition)
A While loop loops through a code as long as a specified condition is true.
SYNTAX :- while(condition){
Code block to be executed
}
Loops
A For loop loops through a array, ranges and other things that contains
a specific number of elements.
SYNTAX :- for(condition){
Code block to be executed
}
Ranges
Ranges are a special way to represent a sequence of numbers.
We use “..” operator to use a range
Arrays
● Array Slicing Operations
● Length/Size
● Loop through a Array
Arrays are used to store multiple values in a single variable, instead
of creating separate variables for each value.
SYNTAX :- val cars = arrayOf(“Ford”,”BMW”,”Volvo”)
Function
A function is a block of code which only runs when it is called. You
can pass data, known as parameters, into a function.
SYNTAX :- fun functionName(){
//Code to be executed
}
Fun functionName():Int{
//Code to be executed
}
BREAK
Class and Object
This work is licensed under the Apache 2.0 License
QnA Session

More Related Content

What's hot

8 introduction to_java_script
8 introduction to_java_script8 introduction to_java_script
8 introduction to_java_scriptVijay Kalyan
 
Real Browser Check Scripting Guide - Rigor Monitoring
Real Browser Check Scripting Guide - Rigor MonitoringReal Browser Check Scripting Guide - Rigor Monitoring
Real Browser Check Scripting Guide - Rigor MonitoringAnthony Ferrari
 
Introduction to JavaScript Programming
Introduction to JavaScript ProgrammingIntroduction to JavaScript Programming
Introduction to JavaScript ProgrammingRaveendra R
 
Java script final presentation
Java script final presentationJava script final presentation
Java script final presentationAdhoura Academy
 
Java Script
Java ScriptJava Script
Java Scriptsiddaram
 
Contracts in Ruby - Vladyslav Hesal
Contracts in Ruby - Vladyslav HesalContracts in Ruby - Vladyslav Hesal
Contracts in Ruby - Vladyslav HesalRuby Meditation
 
Javascript Roadmap - The Basics
Javascript Roadmap - The BasicsJavascript Roadmap - The Basics
Javascript Roadmap - The BasicsAswin Barath
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScriptRangana Sampath
 
Placement and variable 03 (js)
Placement and variable 03 (js)Placement and variable 03 (js)
Placement and variable 03 (js)AbhishekMondal42
 

What's hot (20)

Typescript Basics
Typescript BasicsTypescript Basics
Typescript Basics
 
8 introduction to_java_script
8 introduction to_java_script8 introduction to_java_script
8 introduction to_java_script
 
Real Browser Check Scripting Guide - Rigor Monitoring
Real Browser Check Scripting Guide - Rigor MonitoringReal Browser Check Scripting Guide - Rigor Monitoring
Real Browser Check Scripting Guide - Rigor Monitoring
 
Javascripts. pptt
Javascripts. ppttJavascripts. pptt
Javascripts. pptt
 
Introduction to JavaScript Programming
Introduction to JavaScript ProgrammingIntroduction to JavaScript Programming
Introduction to JavaScript Programming
 
Javascript Basics
Javascript BasicsJavascript Basics
Javascript Basics
 
TypeScript and Angular workshop
TypeScript and Angular workshopTypeScript and Angular workshop
TypeScript and Angular workshop
 
Java script final presentation
Java script final presentationJava script final presentation
Java script final presentation
 
Java Script
Java ScriptJava Script
Java Script
 
Java script
Java scriptJava script
Java script
 
Java script
Java scriptJava script
Java script
 
Java script
Java scriptJava script
Java script
 
Contracts in Ruby - Vladyslav Hesal
Contracts in Ruby - Vladyslav HesalContracts in Ruby - Vladyslav Hesal
Contracts in Ruby - Vladyslav Hesal
 
Javascript Roadmap - The Basics
Javascript Roadmap - The BasicsJavascript Roadmap - The Basics
Javascript Roadmap - The Basics
 
Java script basics
Java script basicsJava script basics
Java script basics
 
Lecture 5 javascript
Lecture 5 javascriptLecture 5 javascript
Lecture 5 javascript
 
JavaScript Variables
JavaScript VariablesJavaScript Variables
JavaScript Variables
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
Placement and variable 03 (js)
Placement and variable 03 (js)Placement and variable 03 (js)
Placement and variable 03 (js)
 
Javascript
JavascriptJavascript
Javascript
 

Similar to Kotlin programming language

QTP VB Script Trainings
QTP VB Script TrainingsQTP VB Script Trainings
QTP VB Script TrainingsAli Imran
 
Best Coding Practices in Java and C++
Best Coding Practices in Java and C++Best Coding Practices in Java and C++
Best Coding Practices in Java and C++Nitin Aggarwal
 
C_BASICS FOR C PROGRAMMER WITH SRIVATHS P
C_BASICS FOR C PROGRAMMER WITH  SRIVATHS PC_BASICS FOR C PROGRAMMER WITH  SRIVATHS P
C_BASICS FOR C PROGRAMMER WITH SRIVATHS Pamankr1234am
 
introduction to server-side scripting
introduction to server-side scriptingintroduction to server-side scripting
introduction to server-side scriptingAmirul Shafeeq
 
Operators loops conditional and statements
Operators loops conditional and statementsOperators loops conditional and statements
Operators loops conditional and statementsVladislav Hadzhiyski
 
Unit 2-data types,Variables,Operators,Conitionals,loops and arrays
Unit 2-data types,Variables,Operators,Conitionals,loops and arraysUnit 2-data types,Variables,Operators,Conitionals,loops and arrays
Unit 2-data types,Variables,Operators,Conitionals,loops and arraysDevaKumari Vijay
 
CodingStandardsDoc
CodingStandardsDocCodingStandardsDoc
CodingStandardsDocAmol Patole
 
Qtpvbscripttrainings
QtpvbscripttrainingsQtpvbscripttrainings
QtpvbscripttrainingsRamu Palanki
 
Learning Solidity
Learning SolidityLearning Solidity
Learning SolidityArnold Pham
 
JavaScript Tutorial For Beginners | JavaScript Training | JavaScript Programm...
JavaScript Tutorial For Beginners | JavaScript Training | JavaScript Programm...JavaScript Tutorial For Beginners | JavaScript Training | JavaScript Programm...
JavaScript Tutorial For Beginners | JavaScript Training | JavaScript Programm...Edureka!
 
Javascript sivasoft
Javascript sivasoftJavascript sivasoft
Javascript sivasoftch samaram
 
Core Java Programming Language (JSE) : Chapter IV - Expressions and Flow Cont...
Core Java Programming Language (JSE) : Chapter IV - Expressions and Flow Cont...Core Java Programming Language (JSE) : Chapter IV - Expressions and Flow Cont...
Core Java Programming Language (JSE) : Chapter IV - Expressions and Flow Cont...WebStackAcademy
 
Learn To Code: Introduction to java
Learn To Code: Introduction to javaLearn To Code: Introduction to java
Learn To Code: Introduction to javaSadhanaParameswaran
 

Similar to Kotlin programming language (20)

QTP VB Script Trainings
QTP VB Script TrainingsQTP VB Script Trainings
QTP VB Script Trainings
 
Programming in Arduino (Part 2)
Programming in Arduino  (Part 2)Programming in Arduino  (Part 2)
Programming in Arduino (Part 2)
 
Introduction to C#
Introduction to C#Introduction to C#
Introduction to C#
 
Best Coding Practices in Java and C++
Best Coding Practices in Java and C++Best Coding Practices in Java and C++
Best Coding Practices in Java and C++
 
C_BASICS FOR C PROGRAMMER WITH SRIVATHS P
C_BASICS FOR C PROGRAMMER WITH  SRIVATHS PC_BASICS FOR C PROGRAMMER WITH  SRIVATHS P
C_BASICS FOR C PROGRAMMER WITH SRIVATHS P
 
introduction to server-side scripting
introduction to server-side scriptingintroduction to server-side scripting
introduction to server-side scripting
 
Operators loops conditional and statements
Operators loops conditional and statementsOperators loops conditional and statements
Operators loops conditional and statements
 
Unit 2-data types,Variables,Operators,Conitionals,loops and arrays
Unit 2-data types,Variables,Operators,Conitionals,loops and arraysUnit 2-data types,Variables,Operators,Conitionals,loops and arrays
Unit 2-data types,Variables,Operators,Conitionals,loops and arrays
 
VB Script Overview
VB Script OverviewVB Script Overview
VB Script Overview
 
Java 17
Java 17Java 17
Java 17
 
CodingStandardsDoc
CodingStandardsDocCodingStandardsDoc
CodingStandardsDoc
 
Qtpvbscripttrainings
QtpvbscripttrainingsQtpvbscripttrainings
Qtpvbscripttrainings
 
Learning Solidity
Learning SolidityLearning Solidity
Learning Solidity
 
JavaScript Tutorial For Beginners | JavaScript Training | JavaScript Programm...
JavaScript Tutorial For Beginners | JavaScript Training | JavaScript Programm...JavaScript Tutorial For Beginners | JavaScript Training | JavaScript Programm...
JavaScript Tutorial For Beginners | JavaScript Training | JavaScript Programm...
 
Javascript sivasoft
Javascript sivasoftJavascript sivasoft
Javascript sivasoft
 
Vb (2)
Vb (2)Vb (2)
Vb (2)
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Core Java Programming Language (JSE) : Chapter IV - Expressions and Flow Cont...
Core Java Programming Language (JSE) : Chapter IV - Expressions and Flow Cont...Core Java Programming Language (JSE) : Chapter IV - Expressions and Flow Cont...
Core Java Programming Language (JSE) : Chapter IV - Expressions and Flow Cont...
 
PPT 19.pptx
PPT 19.pptxPPT 19.pptx
PPT 19.pptx
 
Learn To Code: Introduction to java
Learn To Code: Introduction to javaLearn To Code: Introduction to java
Learn To Code: Introduction to java
 

Recently uploaded

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringWSO2
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightSafe Software
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingWSO2
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 

Recently uploaded (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 

Kotlin programming language

  • 1. This work is licensed under the Apache 2.0 License Kotlin Programming Language Welcome to Android Study Jams Wi-Fi : Super1@dmin
  • 2. This work is licensed under the Apache 2.0 License
  • 3. Comments Print Statement The println() or print() function is used to output values/text. SYNTAX :- print(“Welcome”) println(“To The ASJ”) Comments can be used to explain Kotlin code, and to make it more readable. It can also be used to prevent execution when testing alternative code. SYNTAX :- // This is how you write single line comments. /* This is how you write multi-line comments. */
  • 4. Variables The general rule for Kotlin variables are: ● Names can contain letters, digits, underscores, and dollar signs ● Names should start with a letter ● Names can also begin with $ and _ ● Names are case sensitive ("myVar" and "myvar" are different variables) ● Names should start with a lowercase letter and it cannot contain whitespace ● Reserved words (like Kotlin keywords, such as var or String) cannot be used as names Variables are containers for storing data values. SYNTAX :- var variableName = value val variableName = value
  • 5. Data Types Different Types of data types are: ● Int (For Numbers) ● Double (For Decimal Numbers) ● Char (For Letters) ● Boolean (For True Or False) ● String (For a series of Characters) myNum = 5 myDoubleNum = 10. myLetter = ‘K’ myBoolean = true myString = “Hello”
  • 6. Operators Booleans SYNTAX :- val isKotlinFun : true val isFishTasty : false ● Arithmetic Operators : + , - , * , / , % , ++ , – ● Assignment Operators : = ● Comparison Operators : == , != , > , < , >= , <= ● Logical Operators : && , || , !
  • 7. Conditional Statements ● Use if to specify a block of code to be executed, if a specified condition is true ● Use else to specify a block of code to be executed, if the same condition is false ● Use else if to specify a new condition to test, if the first condition is false ● Use when to specify many alternative blocks of code to be executed SYNTAX :- if(condition){ // if condition is true execute }
  • 8. Loops A Do While loop will execute the code block once, before checking the condition is true, then it will repeat the loop until it’s true. SYNTAX :- do{ Code block to be executed } while(condition) A While loop loops through a code as long as a specified condition is true. SYNTAX :- while(condition){ Code block to be executed }
  • 9. Loops A For loop loops through a array, ranges and other things that contains a specific number of elements. SYNTAX :- for(condition){ Code block to be executed } Ranges Ranges are a special way to represent a sequence of numbers. We use “..” operator to use a range
  • 10. Arrays ● Array Slicing Operations ● Length/Size ● Loop through a Array Arrays are used to store multiple values in a single variable, instead of creating separate variables for each value. SYNTAX :- val cars = arrayOf(“Ford”,”BMW”,”Volvo”)
  • 11. Function A function is a block of code which only runs when it is called. You can pass data, known as parameters, into a function. SYNTAX :- fun functionName(){ //Code to be executed } Fun functionName():Int{ //Code to be executed }
  • 12. BREAK
  • 14. This work is licensed under the Apache 2.0 License QnA Session