摘要: 最近工作中使用到js数组去重复,做个笔记 //去除数组里的重复 Array.prototype.distinct = function() { var a = {}, c = [], l = this.length; for (var i = 0; i < l; i++) { var b = this[i]; var d = (typeof b) + b; if (a[d] === undefined) { c.push(b); a[d] = 1... 阅读全文
posted @ 2013-09-04 09:18 WEB小蜗牛 阅读(351) 评论(0) 推荐(0) 编辑