Removes all elements from array that predicate returns truthy for
and returns an array of the removed elements. The predicate is invoked
with three arguments: (value, index, array).
Note: Unlike filter, this method mutates array. Use pull
to pull elements from an array by value.
Removes all elements from
array
thatpredicate
returns truthy for and returns an array of the removed elements. The predicate is invoked with three arguments: (value, index, array).Note: Unlike
filter
, this method mutatesarray
. Usepull
to pull elements from an array by value.