for (var i = 0; i < arr.length; i++) { if (hash.indexOf(arr[i]) == -1) { hash.push(arr[i]); } } return hash;
数组去重
原文:https://www.cnblogs.com/wangshishuai/p/10996074.html