//es6去重
let arr=[12,45,98,45,21,12,98]
let item=[...new Set(arr)]
console.log(item)
ES6去重
于 2023-03-14 11:10:06 首次发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)
//es6去重
let arr=[12,45,98,45,21,12,98]
let item=[...new Set(arr)]
console.log(item)