New, not-widely-supported method 1/24. The union() method of a Set takes a set and returns a new set containing elements which are in either or both of this set and the given set.

    
    const evens = new Set([2, 4, 6, 8]);

    const squares = new Set([1, 4, 9]);

    const evensUnionSquares = evens.union(squares));

    console.log(evens.union(squares));
    // { 1, 2, 4, 6, 8, 9 }