标签:
function unique(arr) { var result = [], hash = {}; for (var i = 0, elem; (elem = arr[i]) != null; i++) { if (!hash[elem]) { result.push(elem); hash[elem] = true; } } return result; }
数组去重
原文地址:http://www.cnblogs.com/zaimeidemeng/p/5760387.html