difference < Set < JavaScript
New, not-widely-supported method 1/24. The difference() method of a Set takes a set and returns a new set containing elements in this set but not in the given set.
const odds = new Set([1, 3, 5, 7, 9]);
const squares = new Set([1, 4, 9]);
const oddsDifferenceSquares = odds.difference(squares);
console.log(odds.difference(squares));
// Set(3) { 3, 5, 7 }