kotlin for array code example
Example 1: kotlin array
val a: Array<Double> = arrayOf(3.0, 4.5, 8.0, 19.0)
Example 2: kotlin iterate array
val names = listOf("Anne", "Peter", "Jeff")
for (name in names) {
println(name)
}
val a: Array<Double> = arrayOf(3.0, 4.5, 8.0, 19.0)
val names = listOf("Anne", "Peter", "Jeff")
for (name in names) {
println(name)
}