JS數組去重

JS數組去重 最近看了下關於數組去重相關的方法,如今本身作一下總結。web 情境 輸入 [1,1,‘true’,‘true’,true,true,15,15,false,false, undefined,undefined, null,null, NaN, NaN,‘NaN’, 0, 0, ‘a’, ‘a’,{},{}]; 輸出 過濾掉數組中重複的值數組 ES6-set 使用ES6中的set是最簡
相關文章
相關標籤/搜索