Sadly as you've figured out there are no native intersection or union operations. It's not terribly complex to find the intersection though:

let a = new Set([1,2,3])
let b = new Set([1,2,4])
let intersect = new Set([...a].filter(i => b.has(i)));
console.log(...intersect)
Run code snippetEdit code snippet Hide Results Copy to answer Expand

Answer from Kit Sunde on Stack Overflow
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Set › intersection
Set.prototype.intersection() - JavaScript | MDN
May 22, 2026 - The intersection() method of Set instances takes a set and returns a new set containing elements in both this set and the given set.
🌐
W3Schools
w3schools.com › jsref › jsref_set_intersection.asp
JavaScript Set intersection() Method
❮ Previous JavaScript Set Reference ... A.intersection(B); Try it Yourself » · Share Link Copied · The intersection() method returns the intersection of two sets....
🌐
GitHub
github.com › es-shims › Set.prototype.intersection
An ESnext spec-compliant `Set.prototype.intersection` shim ...
When shimmed, it uses es-set to shim the Set implementation itself if needed. ... var assert = require('assert'); var intersection = require('set.prototype.intersection'); var set1 = new Set([1, 2]); var set2 = new Set([2, 3]); var result = intersection(set1, set2); assert.deepEqual(result, new Set([2])); intersection.shim(); var shimmedResult = set1.intersection(set2); assert.deepEqual(shimmedResult, new Set([2]));
Author: es-shims
🌐
Reddit
reddit.com › r/javascript › es6 sets. why no intersection?
r/javascript on Reddit: ES6 sets. Why no intersection?
December 21, 2018 -

The point of sets is that they allow for two useful methods: union and intersection. ES6 sets only support union. Intersection is done using the .filter, so you might aswell just use plain old arrays and use some custom filter code for the union. Why!? Why!?

🌐
Sonar
sonarsource.com › blog › union-intersection-difference-javascript-sets
Union, intersection, difference, and more are coming to JavaScript Sets | Sonar
February 15, 2024 - JavaScript Set methods for union, intersection, and difference are now part of the language specification, providing native collection operations that previously required manual implementation or third-party libraries.
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › how-to-perform-intersection-of-two-sets-in-javascript
How to perform intersection of two sets in JavaScript ? - GeeksforGeeks
July 23, 2025 - Using the has() & filter() Method: We check if the element is present in set1 also then we are going to add that element to the new set. Example 2: In this example, we will see the intersection of sets by using the filter() method.
🌐
Can I Use
caniuse.com › mdn-javascript_builtins_set_intersection
JavaScript built-in: Set: intersection | Can I use... Support tables for HTML5, CSS3, etc
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
🌐
web.dev
web.dev › blog › the javascript set methods are now part of baseline
The JavaScript Set methods are now part of Baseline | Blog | web.dev
June 26, 2024 - You can now use the JavaScript Set methods to perform set operations like intersection, union and more.
🌐
W3Schools
w3schools.com › js › js_set_logic.asp
JavaScript Set Logic
const A = new Set(['a','b','c']); const B = new Set(['b','c','d']); const C = A.intersection(B); Try it Yourself »
🌐
Brittany Chiang
brittanychiang.com
Brittany Chiang
I take pride in creating thoughtful, inclusive products and have a sharp eye for the little details that separate a good product from an exceptional one. I enjoy working most at the intersection of design and engineering, where great user experience meets clean, scalable code.
🌐
Fried Egg Golf
thefriedegg.com › articles › tiering-2026-masters-contenders-rory-scottie-bryson
Tiering 2026 Masters Contenders
April 8, 2026 - I anticipate the biggest blowback to my set of contenders is the omission of Brooks Koepka. His iron play has been encouraging this season, but he is yet to contend in a tournament. Between a poor putter and an inconsistent driver, there are too many holes in Koepka’s game for me to believe he will win this year’s Masters.
🌐
Nature
nature.com › molecular psychiatry › articles › article
Convergent coexpression reveals shared biological mechanisms underlying common and rare variant risk in six neuropsychiatric disorders | Molecular Psychiatry
April 7, 2026 - where, A and B are sets of genes identified across any two gene prioritization approaches. ∣A ∩ B∣ is the number of genes common to both sets (the intersection) and ∣A∪B∣ is the total unique number of genes in either set (the union).
🌐
TestMu AI Community
community.testmuai.com › ask a question
Simplest code for array intersection in JavaScript - Ask a Question - TestMu AI (formerly LambdaTest) Community
May 11, 2025 - What’s the simplest way to find the intersection between two arrays in JavaScript without using any external libraries? I’m just trying to write something like: intersection([1, 2, 3], [2, 3, 4, 5]) And get the result:…
🌐
Telerik
telerik.com › blogs › mastering-advanced-javascript-set-operations
Mastering Advanced JavaScript Set Operations - Telerik Blogs
March 28, 2025 - JavaScript now has a Set data structure which can contain arbitrary values and performs membership checks quickly. We explored the new Set operations added after ES6. Here’s what we learned: Use union, difference and intersection for combining/filtering datasets.
🌐
4Geeks
4geeks.com › how-to › javascript-array-intersection
How to find the interception of Arrays in Javascript?
July 16, 2025 - Learn how to find the intersection of two or more arrays in Javascript. Discover different methods for finding common elements and optimizing your code.
🌐
Laravel
laravel.com › docs › 13.x › collections
Collections | Laravel 13.x - The clean stack for Artisans and agents
Laravel is a framework for building modern web apps and AI agents. Expressive syntax, built-in tools, and everything you need to ship fast.
🌐
Trellis
trellis.net › home › the sustainability profession has been given a mulligan. let’s take it
Sustainability has been given a mulligan. Let's take it
July 16, 2026 - The new director of the Center for Sustainable Business at NYU breaks down how to accelerate embedding sustainability into business.