es6数组去重

let arr=[1,1,2,2,NaN,NaN];

let arr2 = Array.from(new Set(arr));  

arr2即为去重后的结果

你可能感兴趣的:(es6数组去重)