Understanding the destructuring assignment syntax in #javascript
▻https://hackernoon.com/understanding-the-destructuring-assignment-syntax-in-javascript-c3bf8e1e
The ECMAscript 6 specification introduced a new syntax which makes it easier to get values out of arrays and objects. We call this syntax “destructuring”.Photo by Dayne Topkin on UnsplashThe destructuring assignment syntax with ArraysThe destructuring assignment syntax allows you to easily get values out of arrays and objects while using an array or object literal like syntax. This syntax is very short and very easy to read.Without using the destructuring syntax getting multiple values out of an array can be quite cumbersome. You would do something like this:▻https://medium.com/media/0f48d8c9ed05e2b4793b7aa8e535a937/hrefWith the destructuring assignment syntax this can be written like this:▻https://medium.com/media/c1eb8151c491b81f572976394d6875fd/hrefPretty neat, right? Let me explain what’s (...)
#destructuring-syntax #assignment-syntax #front-end-development #es6