Browse Source

docs(pick-omit): correct grammar

1164-findmissingnumber
davhojt 2 years ago committed by Dav Hojt
parent
commit
7dcebe0873
  1. 10
      subjects/pick-omit/README.md

10
subjects/pick-omit/README.md

@ -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…
Cancel
Save