如上所述,for 可以循环遍历任何提供了迭代器的对象。 如果你想要通过索引遍历一个数组或者一个list,你可以这么做: for (i in array.indices) { print ...
確定! 回上一頁