标签:
var arr = [1,2,3,4,5,6,1,6,7,2];
var newArr = [];
for(var i =0;i<arr.length-1;i++){
if(newArr.indexOf(arr[i]) == -1){
newArr.push(arr[i]);
}
数组如何去除重复数据,只保留一条
原文地址:http://www.cnblogs.com/h5c3/p/5761434.html