Kotlin -Indizes

val collection = listOf('a', 'b', 'c')
println(collection.indices) // 0..2

for(i in collection.indices) {
println(i)
}
Joyous Jackal