数组去重的最简方式

[…new Set(arr)]

var Arr = [...new Set(arr)]
console.log(Arr)
//1, "true", true, 15, false, undefined, null, NaN, "NaN", 0, "a", {…}, {…}

你可能感兴趣的:(数组去重的最简方式)