还有一个比较特殊的forEach语法: val list = listOf("Hello", "World",'!') list.forEach{ print("$it ") //这里的it指代被遍历的list中的值 } ...
確定! 回上一頁