are they not for loops in kotlin code example
Example 1: for loop kotlin
for (x in 0..10) println(x)
Example 2: kotlin iterate array
val names = listOf("Anne", "Peter", "Jeff")
for (name in names) {
println(name)
}
for (x in 0..10) println(x)
val names = listOf("Anne", "Peter", "Jeff")
for (name in names) {
println(name)
}