let oldArr = [1, 2, 3, 4, 5, 5 , 6, 7, 8, 2, 3];
let newArr = [...new Set(oldArr)];
console.log(newArr)
js 数组去除重复元素
最新推荐文章于 2022-08-18 10:00:37 发布
let oldArr = [1, 2, 3, 4, 5, 5 , 6, 7, 8, 2, 3];
let newArr = [...new Set(oldArr)];
console.log(newArr)