fix/verbiage

pull/36213/head^2
moT01 2019-06-26 22:00:32 -05:00 committed by Kristofer Koishigawa
parent 72cb38a839
commit 00b5ce97e3
1 changed files with 2 additions and 2 deletions

View File

@ -19,13 +19,13 @@ const user = {
}; };
``` ```
Here's how to extract the values into variables with the same name as they have in the object: Here's how to extract the values of object properties and assign them to variables with the same name:
```js ```js
const { johnDoe: { age, email }} = user; const { johnDoe: { age, email }} = user;
``` ```
And here's how you can assign new variable names when destructuring a nested object: And here's how you can assign an object properties' values to variables with different names:
```js ```js
const { johnDoe: { age: userAge, email: userEmail }} = user; const { johnDoe: { age: userAge, email: userEmail }} = user;