• Returns every element that exists in any of the two arrays once

    Example

    union([1, 2, 3], [4, 3, 2]); // [1,2,3,4]
    

    Type Parameters

    • T extends unknown[]

    • P extends unknown[]

    Parameters

    • arr: T
    • array: P

    Returns [...T, ...P]

Generated using TypeDoc