数组去重 p_der 2018-05-31 练习 exercise, js, web 数组去重练习 在原型链上进行编程 123456789101112Array.prototype.unique = function(){ var obj = {}; var arr = []; var len = this.length; for(var i = 0; i < len; i++){ if(!obj[this[i]]){ obj[this[i]]=true; arr.push(this[i]); } } return arr;}