The array to modify.
Rest
...values: T[]The values to remove.
Rest
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']
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.