如果不使用splice 瑞士刀,可以使用shift, pop 的方式來移除元素: let arr = [1, 2, 3] arr.shift() // return 1 // arr: [2, 3]
確定! 回上一頁