标签:交集 nbsp 数组的交集 set ... || let filter 数组
let arr1=new Set([1,2,3,1,2,3,4,5,3,32,2]);
let arr2=new Set([1,4,32,4,3,6,8,9,9,]);
let arr3=new Set([...arr1].filter((item)=> arr2.has(item)))
|||||||||||||||||||去数组的交集 !arr2.has(item) 非集
new Set([...arr1,...arr2]),取并集
标签:交集 nbsp 数组的交集 set ... || let filter 数组
原文地址:https://www.cnblogs.com/MDGE/p/9918167.html