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.

34 lines
1.0 KiB

5 years ago
## Change
### Instructions
Create 2 functions:
- `get`: a function that takes a key and return the corresponding
value from the sourceObject
- `set`: a function that takes a key and a value update the
value for the corresponding property of the sourceObject
and return the set value
### Notions
- [https://nan-academy.github.io/js-training/examples/functions.js](https://nan-academy.github.io/js-training/examples/functions.js)
- [https://nan-academy.github.io/js-training/examples/data-structures.js](https://nan-academy.github.io/js-training/examples/data-structures.js)
- [https://nan-academy.github.io/js-training/examples/get.js](https://nan-academy.github.io/js-training/examples/get.js)
- [https://nan-academy.github.io/js-training/examples/set.js](https://nan-academy.github.io/js-training/examples/set.js)
5 years ago
### Code provided
> all code provided will be added to your solution and doesn't need to be submited.
5 years ago
```js
const sourceObject = {
num: 42,
bool: true,
str: 'some text',
log: console.log,
}
```