Kotlin Lists
listOf creates a read-only list. A for loop visits each item in order and prints it.
Kotlin
fun main() {
val scores = listOf(82, 91, 76)
for (score in scores) {
println(score)
}
}listOf creates a read-only list. A for loop visits each item in order and prints it.
fun main() {
val scores = listOf(82, 91, 76)
for (score in scores) {
println(score)
}
}