js 删除数组中重复的数据

 1 function delCongfu(typeArray){
 2     
 3     var str = []; 
 4     for(var i = 0,len = typeArray.length;i < len;i++){ 
 5     ! RegExp(typeArray[i],"g").test(str.join(",")) && (str.push(typeArray[i])); 
 6     } 
 7     alert(str);
 8 
 9 }
10 //传入数组typeArray,生成的新数组str.
原文地址:https://www.cnblogs.com/wqing/p/3014217.html