Function difference

  • Creates an array of array values not included in the other given arrays using SameValueZero for equality comparisons. The order and references of result values are determined by the first array.

    Note: Unlike pullAll, this method returns a new array.

    Type Parameters

    • T

    Parameters

    • array: T[]

      The array to inspect.

    • Optional Rest...values: T[][]

      The values to exclude.

    Returns T[]

    Returns the new array of filtered values.

    0.1.0

    union, unionBy, unionWith, without, xor, xorBy, xorWith,

    difference([2, 1], [2, 3])
    // => [1]