mirror of https://github.com/01-edu/public.git
Clement Denis
4 years ago
32 changed files with 125 additions and 39 deletions
@ -1,29 +1,31 @@ |
|||||||
## Mutability |
## Mutability |
||||||
|
|
||||||
### Instructions |
### Instructions |
||||||
|
|
||||||
Create a copy of the person object called clone1. |
Create a copy of the person object called clone1. |
||||||
Create an other copy of the person object called clone2. |
Create an other copy of the person object called clone2. |
||||||
|
|
||||||
Create a new variable `samePerson` with the same value as `person`. |
Create a new variable `samePerson` with the same value as `person`. |
||||||
|
|
||||||
Increase by one the property age of `person` |
Increase by one the property age of `person` |
||||||
and set his contry to `'FR'`. |
and set his contry to `'FR'`. |
||||||
|
|
||||||
|
|
||||||
### Notions |
### Notions |
||||||
|
|
||||||
- [nan-academy.github.io/js-training/examples/set.js](https://nan-academy.github.io/js-training/examples/set.js) |
- [nan-academy.github.io/js-training/examples/set.js](https://nan-academy.github.io/js-training/examples/set.js) |
||||||
- [nan-academy.github.io/js-training/examples/get.js](https://nan-academy.github.io/js-training/examples/get.js) |
- [nan-academy.github.io/js-training/examples/get.js](https://nan-academy.github.io/js-training/examples/get.js) |
||||||
- [nan-academy.github.io/js-training/examples/data-structures.js](https://nan-academy.github.io/js-training/examples/data-structures.js) |
- [nan-academy.github.io/js-training/examples/data-structures.js](https://nan-academy.github.io/js-training/examples/data-structures.js) |
||||||
|
|
||||||
|
|
||||||
### Code provided |
### Code provided |
||||||
this code does not need to be sent for verification |
|
||||||
```js |
> all code provided will be added to your solution and doesn't need to be submited. |
||||||
const person = { |
|
||||||
name: 'Rick', |
```js |
||||||
age: 77, |
const person = { |
||||||
country: 'US', |
name: 'Rick', |
||||||
} |
age: 77, |
||||||
``` |
country: 'US', |
||||||
|
} |
||||||
|
``` |
||||||
|
Loading…
Reference in new issue