val numbers = arrayOf(1, 2, 3, 4, 5) // 删除最后 3 个元素, [1, 2] numbers.dropLast(3).forEach { _console.log(it) }