标签:style OLE ons console col bsp color func 去重
//数组去重 function noRepeat(arr){ var i=0; var len=arr.length; var obj={}; var resArr=[]; while(++i<len){ obj[arr[i]]||resArr.push(arr[i]) obj[arr[i]]=true; } return resArr; } var arr1=[1,6,9,5,3,6,9,1,2,3,3]; console.log(noRepeat(arr1));
标签:style OLE ons console col bsp color func 去重
原文地址:https://www.cnblogs.com/wtsx-2019/p/14639697.html