var arr=[2,8,5,6,7,8,1,5,4,7,85,1,5];

var arr2=[1,5,8,4,2,9,3,5,2,1];

Array.prototype.quchong=function(){

var result=[];

for (var i = 0; i ++) {

if (result.indexOf(this[i])<0) {

result.push(this[i]);

}

}

return result;

}

console.log(arr.quchong());

 

posted on 2017-06-05 20:48  鄢宁  阅读(145)  评论(0编辑  收藏  举报