This method is like _.pull except that it accepts an array of values to remove.
_.pull
Note: Unlike _.difference, this method mutates array.
_.difference
array
The array to modify.
Optional
The values to remove.
Returns array.
var array = [1, 2, 3, 1, 2, 3];_.pull(array, [2, 3]);console.log(array);// => [1, 1] Copy
var array = [1, 2, 3, 1, 2, 3];_.pull(array, [2, 3]);console.log(array);// => [1, 1]
_.pullAll
This method is like
_.pull
except that it accepts an array of values to remove.Note: Unlike
_.difference
, this method mutatesarray
.