union
union<T>(a: T[], b: T[]): T[]Source: array.ts:204
Finds the union of two arrays
Type Parameters
T— Array element type
Parameters
a(T[]) — First arrayb(T[]) — Second array
Returns
T[]— Array with unique elements from both arrays
Example
CODE
union([1, 2, 3], [2, 3, 4]) // [1, 2, 3, 4]