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]}") }

上一篇下一篇

猜你喜欢

热点阅读