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.

28 lines
860 B

## Mutability
### Instructions
3 years ago
Create three copies of the person object called `clone1`, `clone2` and `samePerson`.
3 years ago
Increase by one the property age of `person` and set his country to `'FR'`.
3 years ago
A way must be found to have `clone1` and `clone2` keep the original values while `samePerson` changes with `person`.
### Notions
- [nan-academy.github.io/js-training/examples/set](https://nan-academy.github.io/js-training/examples/set.js)
- [nan-academy.github.io/js-training/examples/get](https://nan-academy.github.io/js-training/examples/get.js)
- [nan-academy.github.io/js-training/examples/data-structures](https://nan-academy.github.io/js-training/examples/data-structures.js)
### Code provided
> all code provided will be added to your solution and doesn't need to be submited.
```js
const person = {
name: 'Rick',
age: 77,
country: 'US',
}
```