* Computes setA U setB. * * @template T * @param {Set. } setA * @param {Set. }setB * @returns {Set. } The union of setA and setB
(setA, setB)
| 438 | * @returns {Set.<T>} The union of setA and setB |
| 439 | */ |
| 440 | function setUnion(setA, setB) { |
| 441 | return new Set([...setA, ...setB]); |
| 442 | } |
| 443 | |
| 444 | /** |
| 445 | * Checks if two sets contain the same elements. |