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]}") }
本文标题:For 循环
本文链接:https://www.haomeiwen.com/subject/bbupaqtx.html
网友评论