//删除红色的元素  splice(下标,长度)
var arr = ['a','b','c','d'];
arr.splice(1,1);
console.log(arr);  
//['a','c','d']; 
var arr2 = ['a','b','c','d'] arr2.splice(1,2); console.log(arr2); //['a','d']
posted on 2018-09-15 21:40  DMC-尼禄  阅读(172)  评论(0)    收藏  举报