📅  最后修改于: 2022-03-11 15:01:47.990000             🧑  作者: Mango
const intersection = new Set(Array.from(set1).filter(x => set2.has(x)));
const difference = new Set(Array.from(set1).filter(x => !set2.has(x)));