filmov
tv
How and why to use Array Destructuring in Javascript
![preview_player](https://i.ytimg.com/vi/PVVDTq1W0rI/maxresdefault.jpg)
Показать описание
In this video you are going to learn the basics of array destructuring in Javascript and some cool tricks you can perform using it.
Array destructuring was introduced by ES6 and is one of many improvements to the Javascript language. It enables us to write cleaner code and to avoid repeating ourselves (DRY principle).
We use destructuring in Javascript to unpack data from more complex data structures like arrays and objects into individual variables of choice, without having to repeat ourselves too much.
✍️ Check my blog post on the topic:
✔️ Topics covered:
- Array destructuring basics
- Specifying default values for nonexisting elements
- Ignoring elements
- Destructuring iterables
- Nested array destructuring
- Swapping variables
- Multiple return function values
- Capturing the rest of an array as another array
🌎 Look me up:
#destructuring #es6 #javascript #codelistic
Array destructuring was introduced by ES6 and is one of many improvements to the Javascript language. It enables us to write cleaner code and to avoid repeating ourselves (DRY principle).
We use destructuring in Javascript to unpack data from more complex data structures like arrays and objects into individual variables of choice, without having to repeat ourselves too much.
✍️ Check my blog post on the topic:
✔️ Topics covered:
- Array destructuring basics
- Specifying default values for nonexisting elements
- Ignoring elements
- Destructuring iterables
- Nested array destructuring
- Swapping variables
- Multiple return function values
- Capturing the rest of an array as another array
🌎 Look me up:
#destructuring #es6 #javascript #codelistic