mirror of https://github.com/01-edu/public.git
Clement Denis
5 years ago
32 changed files with 125 additions and 39 deletions
@ -1,29 +1,31 @@
|
||||
## Mutability |
||||
|
||||
### Instructions |
||||
|
||||
Create a copy of the person object called clone1. |
||||
Create an other copy of the person object called clone2. |
||||
|
||||
Create a new variable `samePerson` with the same value as `person`. |
||||
|
||||
Increase by one the property age of `person` |
||||
and set his contry to `'FR'`. |
||||
|
||||
|
||||
### 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/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) |
||||
|
||||
|
||||
### Code provided |
||||
this code does not need to be sent for verification |
||||
```js |
||||
const person = { |
||||
name: 'Rick', |
||||
age: 77, |
||||
country: 'US', |
||||
} |
||||
``` |
||||
## Mutability |
||||
|
||||
### Instructions |
||||
|
||||
Create a copy of the person object called clone1. |
||||
Create an other copy of the person object called clone2. |
||||
|
||||
Create a new variable `samePerson` with the same value as `person`. |
||||
|
||||
Increase by one the property age of `person` |
||||
and set his contry to `'FR'`. |
||||
|
||||
|
||||
### 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/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) |
||||
|
||||
|
||||
### 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', |
||||
} |
||||
``` |
||||
|
Loading…
Reference in new issue