标签:bsp temp uniq js数组 数组去重 this func i++ color
Array.prototype.unique = function (){ var temp = {}, arr = [], len = this.length; for(var i = 0; i < len; i++){ if(!temp[this[i]]){ temp[this[i]] = ‘abc‘; arr.push(this[i]); } } return arr; }
标签:bsp temp uniq js数组 数组去重 this func i++ color
原文地址:https://www.cnblogs.com/summer-qd/p/10954364.html