Closed this issue 2 years ago · 1 comments
let myArray2 = [1,2,3,4,5] myArray2.splice(4,2) myArray2 => [1, 2, 3, 4]
这样肯定报错,索引 4 起只有一个元素,你要删除 2 个,就会报错