Set:类似于数组,但是成员的值都是唯一的
let a = new Set([1, 2, 3]);
let b = new Set([4, 3, 2]);// 并集
let union = new Set([...a, ...b]);// 交集
let intersect = new Set([...a].filter(x => b.has(x)));// 差级
let difference = new Set( [...a].filter(x => !b.has(x)));
参考《ES6标准入门》 P211