ended7월 23일· 1 sources

You've been doing Set math by hand. JavaScript finally shipped `.union()`, `.intersection()`, and friends.

Why it matters

You've written some version of this: const intersection = new Set([...setA].filter(x => setB.has(x))); const difference = new Set([...setA].filter(x => !setB.has(x))); const union = new Set([...setA, ...

1
Sources
+0
24h
Growth
5d
Active

Sources

Related Issues