val numbers = arrayOf(1, 2, 3, 4, 5) // 获取索引为 1、3 和 4 的元素,切片后的元素: [2, 4, 5] numbers.slice(listOf(1, 3, 4)).forEach { _console.log(it) }