Function intersection

  • Creates an array of unique values that are included in all given arrays.

    Type Parameters

    • Item

      Type of the arrays elements.

    Parameters

    • Rest ...arrays: Item[][]

      The arrays to inspect.

    Returns Item[]

    The new array of intersecting values.

    Example

    intersection([1, 2], [2, 3]);
    // => [2]

Generated using TypeDoc