pullAtValue
Mutates the original array to filter out the values specified. Returns the removed elements.
- Use Array.prototype.filter()andArray.prototype.includes()to pull out the values that are not needed.
- Set Array.prototype.lengthto mutate the passed in an array by resetting its length to0.
- Use Array.prototype.push()to re-populate it with only the pulled values.
- Use Array.prototype.push()to keep track of pulled values.