Loop over multiple arrays simultaneously: Difference between revisions

m
→‎{{header|Kotlin}}: edited a comment and removed a typo
(→‎Kotlin: made the kotlin example not use Java)
m (→‎{{header|Kotlin}}: edited a comment and removed a typo)
Line 2,349:
for (i in 0..2) println("${a1[i]}${a2[i]}${a3[i]}")
println()
// For arrays of different sizes, we wouldcan need toonly iterate up to the minimum size of all 3the insmallest orderarray.
// to get a contribution from each one.
val a4 = intArrayOf(4, 5, 6, 7)
val a5 = charArrayOf('d', 'e')
32

edits