pullAll source npm

_.pullAll(array, values)

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

Note: Unlike _.difference, this method mutates array.

Arguments

  1. array (Array)

    The array to modify.

  2. values (Array)

    The values to remove.

Returns (Array)

Returns array.

Example

var array = [1, 2, 3, 1, 2, 3];

_.pull(array, [2, 3]);
console.log(array);
// => [1, 1]