Represents a union set operation, where the union is the elements from both set A and set B.
A ∪ B = {x: x ∈ A | x ∈ B}
O(n * m)
n = |B|
Set<TElement>
Set A of type <TElement> elements
<TElement>
Set B of type <TElement> elements
Union of A and B
Set.prototype.union
// {A, B, C} ∪ {E, F, G} = {A, B, C, D, E, F, G}getUnion(new Set(['A', 'B', 'C']), new Set(['E', 'F', 'G'])); // new Set(['A', 'B', 'C', 'E', 'F', 'G']) Copy
// {A, B, C} ∪ {E, F, G} = {A, B, C, D, E, F, G}getUnion(new Set(['A', 'B', 'C']), new Set(['E', 'F', 'G'])); // new Set(['A', 'B', 'C', 'E', 'F', 'G'])
Generated using TypeDoc
Represents a union set operation, where the union is the elements from both set A and set B.
A ∪ B = {x: x ∈ A | x ∈ B}
O(n * m)
, wheren = |B|
(size of set B).Set<TElement>
instance.