js数组去重
程序员文章站
2022-06-28 13:21:03
1 let arr = [1,4,4,4,2,2] 2 console.log([...new Set(arr)]) // [1,4,2] ......
1 let arr = [1,4,4,4,2,2]
2 console.log([...new set(arr)]) // [1,4,2]