How to use array destructuring to simplify your javascript code #shorts

preview_player
Показать описание
A short example on how to use array destructuring to grab specific elements from an array.

------------

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

Yesterday i was reading about array Destructurin and today i saw the video of your Now i completely understand that concept... Thanks ❤️

nightfury
Автор

I really enjoy your short videos man. I am now subscribed and will leave a like as much as I can.

agnosticmanquestionsall
Автор

These unpacking sentences is absolutely useful and more readable in no mater what languages

like:
C++
auto t = {1, 2.0, '3'};
auto [a, b, c] = t;

Python:
t = (1, 2.0, '3')
a, b, c = t

kblueleaf
Автор

This is very useful. I am currently working with Google Sheets which is all about arrays. Thanks a lot

boredomindex
Автор

is very useful when you write your own hooks

wil-fri
Автор

Don't forget the spread operator ;)

kristiyanbalevski
Автор

Crystal Clear like 💧waters in the blue ocean. 👍

whitecodecamp
Автор

When unpacking like this, do you have to declare the variables in the same type of structure? One video you utilized { } while this one utilizes [ ]. The braces matched the structs being unpacked, just curious if that's the case with JS

jamaka_me_code
Автор

So this is similar to tuple unpacking in Python?

mastersquid
Автор

just like python's tuple unpacking, but without the brackets!

SpaghettDev
Автор

What is the name of the theme you use ?

ridhamsuhagiya