var arr=[1,2,3,1,1,3,4,5,6];
var arr2= [...new Set(arr)]
console.log(arr2);
ES6去重数组
最新推荐文章于 2023-07-05 16:46:33 发布
var arr=[1,2,3,1,1,3,4,5,6];
var arr2= [...new Set(arr)]
console.log(arr2);