标签:
//数组去重 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; }
标签:
原文地址:http://www.cnblogs.com/mengxiang-1234/p/4688344.html