Loop over multiple arrays simultaneously: Difference between revisions
Loop over multiple arrays simultaneously (view source)
Revision as of 17:42, 19 January 2023
, 1 year ago→{{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
val a4 = intArrayOf(4, 5, 6, 7)
val a5 = charArrayOf('d', 'e')
|