js数组去重
面试80%会被问到的问题
Array.prototype.delRepeat = function () {
var newArray = [];
var provisionalTable = {};
for (var i = 0, item;
(item = this[i]) != null; i++) {
if (!provisionalTable[item]) {
newArray.push(item);
provisionalTable[item] = true;
}
}
return newArray;
}