docs(pick-omit): correct grammar

This commit is contained in:
davhojt 2022-06-19 22:02:05 +03:00 committed by Dav Hojt
parent e27fbf1abd
commit 7dcebe0873
1 changed files with 4 additions and 6 deletions

View File

@ -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)