标签:
测试方法
function test(){ var arr = [0,1,2,3]; arr.splice(1,1,‘a‘);//case console.dir(arr); }
case1: arr.splice(1,0,‘a‘);
case2: arr.splice(1,1,‘a‘);
case3: arr.splice(1,2,‘a‘);
case4: arr.splice(1,5,‘a‘);
初步总结
arrayObj.splice(start, deleteCount, [item1[, item2[, . . . [,itemN]]]])
标签:
原文地址:http://www.cnblogs.com/zno2/p/4828675.html