一行代码数组去重 发表于 2018-07-08 更新于 2021-03-08 分类于 js 123let arr = [1, 1, 2, 2, 3, 3];let newarr = Array.from(new Set(arr));console.log(newarr);//[1, 2, 3]