ES6-Set数据结构 类似于数组,但是成员的值都是唯一的,没有重复。Set本身是一个构造函数,用来生成Set数据结构 ①实现去重: const s = new Set(); [2, 3, 5, 4, 5, 2, 2].forEach(x => s.add(x)); console.log(s);