Removes all given values from array using SameValueZero for equality comparisons.
array
SameValueZero
Note: Unlike without, this method mutates array. Use remove to remove elements from an array by predicate.
without
remove
The array to modify.
Rest
Returns array.
2.0.0
pullAll, pullAllBy, pullAllWith, pullAt, remove, reject
const array = ['a', 'b', 'c', 'a', 'b', 'c']pull(array, 'a', 'c')console.log(array)// => ['b', 'b'] Copy
const array = ['a', 'b', 'c', 'a', 'b', 'c']pull(array, 'a', 'c')console.log(array)// => ['b', 'b']
Removes all given values from
array
usingSameValueZero
for equality comparisons.Note: Unlike
without
, this method mutatesarray
. Useremove
to remove elements from an array by predicate.