• Function to find the intersection between two arrays

    Type Parameters

    • T

    Parameters

    • array1: T[]
    • array2: T[]

    Returns any[]

    {T[]}

    Example

    intersection([1, 2, 3], [1], [1]);
    // return [1]

    Example

    intersection([1, 2, 4, 7], [4, 6, 7]);
    // return [4, 7]

Generated using TypeDoc