var test=[1,2,1,2,3,4,5,6,7];
1.remove
test.remove(1) 位置
test.remove(-2)
test.remove(2,3)
2 delete
delete test[3]
3 splice
test.splice(2,1,‘ttt‘); 开始的位置,删除的个数,添加的个数
var test=[1,2,1,2,3,4,5,6,7];
1.remove
test.remove(1) 位置
test.remove(-2)
test.remove(2,3)
2 delete
delete test[3]
3 splice
test.splice(2,1,‘ttt‘); 开始的位置,删除的个数,添加的个数
原文:https://www.cnblogs.com/mttcug/p/8598286.html