Function pullAll

  • This method is like pull except that it accepts an array of values to remove.

    Note: Unlike difference, this method mutates array.

    Type Parameters

    • T

    Parameters

    • array: T[]

      The array to modify.

    • values: T[]

      The values to remove.

    Returns T[]

    Returns array.

    5.11.0

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

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

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