correction for code template consistency
':' character is indicating 'var2' is a key of object.
This commit is contained in:
parent
d5195b5d59
commit
9fb20768b0
1 changed files with 1 additions and 1 deletions
|
@ -187,7 +187,7 @@ The destructuring assignment also works with objects.
|
|||
The basic syntax is:
|
||||
|
||||
```js
|
||||
let {var1, var2} = {var1:…, var2…}
|
||||
let {var1, var2} = {var1:…, var2:…}
|
||||
```
|
||||
|
||||
We have an existing object at the right side, that we want to split into variables. The left side contains a "pattern" for corresponding properties. In the simple case, that's a list of variable names in `{...}`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue