常用的:遍历一个数组/集合,只取出下标:val array = arrayOf(“a”, “b”, “c”)for (index in array.indices){println(“index=$index”)//输出0,1,2} ...
確定! 回上一頁