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.

16 lines
734 B

## Pick Omit
5 years ago
### 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.
5 years ago
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.
> Those functions are pure and must not modify the given object
5 years ago
### Notions
- [devdocs.io/javascript/global_objects/object](https://devdocs.io/javascript/global_objects/object)