,1,1,1,1,1,2,2,2,2,22,1,1,1,1,1 ` var arr = [1]; Var obj ={var obj ={ // "1":'aaa', Array.prototype.unique = function() {var temp = {}, array.prototype. unique = function() {var temp = {}, Arr = [], len = this.length; arr = [], len = this.length; For (var I = 0; i < len; i++){ if(! Temp [this[I]]){temp[this[I]] = "ABC "; temp[this[I]] =" ABC "; // All values are not repeated. Arr. Push (this[I]); } // only if the property value is undefined. Operator, true} return arr; } `Copy the code