forloop kotlin code example
Example 1: kotlin for loop
val list = listOf("A", "B", "C")
for (element in list) {
println(element)
}
Example 2: kotlin simple for loop
val names = listOf("Jack", "John", "Tim")
for(name in names){
println(name)
}
val list = listOf("A", "B", "C")
for (element in list) {
println(element)
}
val names = listOf("Jack", "John", "Tim")
for(name in names){
println(name)
}