Pullat

_.pullAt(array, [indexes])

Removes elements from array corresponding to indexes and returns an array of removed elements.

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

Arguments

array (Array): The array to modify.
[indexes] (...(number|number[])): The indexes of elements to remove.

Returns

(Array): Returns the new array of removed elements.

Example

Deep