kotlin array for loop code example
Example 1: kotlin simple for loop
val names = listOf("Jack", "John", "Tim")
for(name in names){
println(name)
}
Example 2: for loop kotlin
for (x in 0..10) println(x)
val names = listOf("Jack", "John", "Tim")
for(name in names){
println(name)
}
for (x in 0..10) println(x)