mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
679 B
26 lines
679 B
4 years ago
|
## Filter
|
||
|
|
||
|
### Instructions
|
||
|
|
||
|
- Create a `filter` function that takes an array as first argument, a function as second,
|
||
|
and that works like the method [].filter
|
||
|
|
||
|
- Create a `reject` function that takes an array as first argument, a function as second,
|
||
|
and that works like the reject function from lodash.
|
||
|
|
||
|
- Create a `partition` function that takes an array as first argument, a function as second,
|
||
|
and that works like the partition function from lodash.
|
||
|
|
||
|
|
||
|
### Notions
|
||
|
|
||
|
- https://devdocs.io/javascript/global_objects/array/filter
|
||
|
- https://lodash.com/docs/4.17.15#reject
|
||
|
- https://lodash.com/docs/4.17.15#partition
|
||
|
|
||
|
|
||
|
### Code provided
|
||
|
```js
|
||
|
Array.prototype.filter = undefined
|
||
|
```
|