Employers
Jobseekers
Recruiting Partners
Login
Join Hyring
Join Hyring
Lesson
Introduction
Get Started
Syntax
Output
Comments
Variables
Data Types
Operators
Strings
Booleans
If...Else
When
While Loop
Break/Continue
Arrays
For Loop
Ranges
Functions
OOP
Classes/Objects
Constructors
Class Functions
Inheritance
Back to lesson
Kotlin For Loop
Looping over a range
Looping over a list
Looping with index and value
Destructuring a map
Run
Language:
Kotlin
Change Theme
Change orientation
fun main() { for (i in 1..5) { println("Count: $i") } }
fun main() { for (i in 1..5) { println("Count: $i") } }
Output
Click Run to execute this code.