ES6 JavaScript Destructuring

preview_player
Показать описание
How you can use destructuring to handle efficiently extracting one or more values from Arrays or Objects with a single line of code.

Рекомендации по теме
Комментарии
Автор

It's crazy how good you are at explaining all your Tutorials are GOLD... Thank you

AntonStunts
Автор

Thank you, Steve. You're amazing!

perlaroyercastillo
Автор

Thank you for sharing these priceless tutorials

rotrose
Автор

Steve, a few brief questions:
1. Can sets and maps be destructured?
2. If so, are there any differences in the approach compared to destructuring arrays and objects?
3. Does the original array or object remain intact after destructuring?
Thanks!

bernarddeluca
Автор

Steve, may I ask why the parentheses with the object restructuring was necessary? what rule does that follows?

juniordallagnolo
Автор

How can I further use push and pop after this statement?
const [a, b, ...{ pop, push }] = [1, 2, 3];
And how can I able to destruct properties of a set and map type?

devT
Автор

I have 2 questions:
1. Is it possible to perform object destructuring on deeply nested objects ?
2. can I set a name other than the object key names (like alias) for the properties I want to extract when I do the destructuring?

swinyx
Автор

At 1:41 my code did not work, because I normally omit semicolons (lazy). When I added a semi to line 7, line 9 was interpreted correctly.

paulbrugger