js-数组去重
function unique(arr) {
debugger;
var result = [], hash = {};
for (var i = 0, elem; (elem = arr[i]) != null; i++) {
if (!hash[elem]) {
result.push(elem);
hash[elem] = true;
}
}
return result;
}
var aTest=[1,2,3,3,3,4,5,9];
console.log(unique(aTest))