Function default

  • Creates an array excluding all given values using SameValueZero for equality comparisons.

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

    Parameters

    • array: any

      The array to inspect.

    • Optional Rest ...values: any[]

      The values to exclude.

      Optional Rest

    Returns any[]

    Returns the new array of filtered values.

    Since

    0.1.0

    See

    difference, union, unionBy, unionWith, xor, xorBy, xorWith

    Example

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