标签:io ar for on cti ef type 方法 return
//给数组添加方法del(),作用是筛选数组内的重复项
Array.prototype.del = function() {
var a = {}, c = [], length = this.length;
for (var i = 0; i < length; i++) {
var b = this[i];
var d = (typeof b) + b;
if (a[d] === undefined) {
c.push(b);
a[d] = 1;
}
}
return c;
}
标签:io ar for on cti ef type 方法 return
原文地址:http://www.cnblogs.com/xjt360/p/4048782.html