commit
9c3ebf4723
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ Unwanted elements of the array can also be thrown away via an extra comma:
|
|||
let [, , title] = ["Julius", "Caesar", "Consul", "of the Roman Republic"];
|
||||
*/!*
|
||||
|
||||
alert( title ); // Imperator
|
||||
alert( title ); // Consul
|
||||
```
|
||||
|
||||
In the code above, the first and second elements of the array are skipped, the third one is assigned to `title`, and the rest is also skipped.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue