For 循环
2019-05-15 本文已影响0人
秋分落叶
for ((index, value) in array.withIndex()) { println("the element at $index is $value")}
for (index in items.indices) { println("item at $index is ${items[index]}") }
for ((index, value) in array.withIndex()) { println("the element at $index is $value")}
for (index in items.indices) { println("item at $index is ${items[index]}") }