js数组去重

1 let arr = [1,4,4,4,2,2]

2 console.log([...new Set(arr)]) // [1,4,2] 

posted @ 2019-02-28 17:02  palelight  阅读(121)  评论(1)    收藏  举报