val mutableList: MutableList<Int> = mutableListOf(1,2,3,4,5) mutableList.add(6) for (i in 0 until mutableList.size) { println(mutableList.get(i)) // 1,2,3,4,5,6 }
Last updated 6 years ago