js处理数组重复元素示例代码_javascript技巧
时间:2021-07-01 10:21:17
帮助过:29人阅读
代码如下:
function doSz{
var kzly==["a","a","c","a","b"];
for(var i=0;ivar targetNode = kzly[i];
for (var j=0; jif(targetNode == kzly[j]){
kzly.splice(i,1);
kzlymc.splice(i,1);
//alert(arr);
break;
}
}
}
}