NewDash

    Function pull

    • Removes all given values from array using SameValueZero for equality comparisons.

      Note: Unlike without, this method mutates array. Use remove to remove elements from an array by predicate.

      Type Parameters

      • T

      Parameters

      • array: T[]

        The array to modify.

      • ...values: T[]

        The values to remove.

      Returns T[]

      Returns array.

      5.11.0

      [[pullAll]], [[pullAllBy]], [[pullAllWith]], [[pullAt]], [[remove]], [[reject]]

      const array = ['a', 'b', 'c', 'a', 'b', 'c']

      pull(array, 'a', 'c')
      console.log(array)
      // => ['b', 'b']
    MMNEPVFCICPMFPCPTTAAATR