mirror of https://github.com/01-edu/public.git
docs(manipulate-entries): add prototype types for expected functions
This commit is contained in:
parent
6c11b94e14
commit
b70f111c29
|
@ -4,9 +4,9 @@
|
||||||
|
|
||||||
Create 3 functions which work like the `.filter`, `.map` and `.reduce` array methods, but for the **entries** in the grocery cart.
|
Create 3 functions which work like the `.filter`, `.map` and `.reduce` array methods, but for the **entries** in the grocery cart.
|
||||||
|
|
||||||
- `filterEntries`: filters using both key and value.
|
- `filterEntries`: filters using both key and value, passed as an array (`[k, v]`).
|
||||||
- `mapEntries`: changes the key, the value or both.
|
- `mapEntries`: changes the key, the value or both, passed as an array (`[k, v]`).
|
||||||
- `reduceEntries`: reduces the entries.
|
- `reduceEntries`: reduces the entries passing keys and values as an array (`[k, v]`).
|
||||||
|
|
||||||
Create 3 additional functions that use your previously created functions and take an object as input:
|
Create 3 additional functions that use your previously created functions and take an object as input:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue