DEV Community

Discussion on: [JavaScript] 5 Interesting uses of JavaScript destructuring!

Collapse
 
yumatsushima07 profile image
Yuma-Tsushima

Nice point out but I do like giving people a preview

Collapse
 
grahamthedev profile image
GrahamTheDev • Edited

Note the comma on the left side of the destructuring: it means that the first element is ignored. secondColor is assigned with the element at index 1 from the colors array.

That doesn’t lead in to the next section it is referencing a code snippet that is either missing (which after rereading, looks to be the case) or further down and part of section 3 but you changed the example. Either way it is definitely not right!

Or if you were being sarcastic and I missed it then feel free to r/whoosh me 😜🤣

Thread Thread
 
yumatsushima07 profile image
Yuma-Tsushima • Edited

ahahha

yeah I was being sarcastic , it was more of a trick

Thread Thread
 
bogdanbatsenko profile image
bogdanbatsenko

It was a trick to provoke thinking over again and getting to the bottom of the topic