//数组去重
Array.prototype.unique = function() {
var newArr = [], hash = {};
for(var i=0, len=this.length; i<len; i++) {
if(!hash[this[i]]) {
newArr.push(this[i]);
hash[this[i]] = true;
}
}
return newArr;
}
//数组去重
Array.prototype.unique = function() {
var newArr = [], hash = {};
for(var i=0, len=this.length; i<len; i++) {
if(!hash[this[i]]) {
newArr.push(this[i]);
hash[this[i]] = true;
}
}
return newArr;
}