Update snippet descriptions
This commit is contained in:
@ -6,7 +6,8 @@ tags: array,intermediate
|
||||
Mutates the original array to filter out the values specified.
|
||||
|
||||
- Use `Array.prototype.filter()` and `Array.prototype.includes()` to pull out the values that are not needed.
|
||||
- Use `Array.prototype.length = 0` to mutate the passed in an array by resetting it's length to zero and `Array.prototype.push()` to re-populate it with only the pulled values.
|
||||
- Set `Array.prototype.length` to mutate the passed in an array by resetting its length to `0`.
|
||||
- Use `Array.prototype.push()` to re-populate it with only the pulled values.
|
||||
|
||||
```js
|
||||
const pull = (arr, ...args) => {
|
||||
|
||||
Reference in New Issue
Block a user