A guide to destructuring in JavaScript

I love those three little dots in JavaScript. Mat Marquis has a nice article covering them (“destructuring” as it were) nicely. And agreed there are plenty of times they can be confusing. What always gets me is that sometimes it is used to “pluck off” the remaining the values from an array or object (which is “rest”), and sometimes it’s used to “splat on” all the values from an array or object (which is “spread”).

It's time to take your JavaScript to the next level

Leave a Reply

Your email address will not be published. Required fields are marked *

Did you know?

Frontend Masters Donates to open source projects. $313,806 contributed to date.