mirror of https://github.com/01-edu/public.git
docs(pick-omit): correct grammar
This commit is contained in:
parent
e27fbf1abd
commit
7dcebe0873
|
@ -2,14 +2,12 @@
|
|||
|
||||
### Instructions
|
||||
|
||||
Create a `pick` function that takes an object and a string or array of strings.
|
||||
This function returns a new object that contains only the key/value pairs, whose key matches with the string or a string in the array, from the object passed as an argument.
|
||||
|
||||
Create a `omit` function that takes an object and a string or array of strings.
|
||||
This function returns a new object that contains only the key/value pairs, whose key doesn't match with the string or a single string in the array, from the object passed as an argument.
|
||||
Create two functions which taken an object and a string or array of strings. They should return a new object which:
|
||||
- `pick`: contains only those keys which appear in the string or array of strings.
|
||||
- `omit`: contains only those keys which do not match the string, or do not appear in the array of strings.
|
||||
|
||||
> Those functions are pure and must not modify the given object
|
||||
|
||||
### Notions
|
||||
|
||||
- [devdocs.io/javascript/global_objects/object](https://devdocs.io/javascript/global_objects/object)
|
||||
- [object](https://devdocs.io/javascript/global_objects/object)
|
||||
|
|
Loading…
Reference in New Issue