Destructuring an object is a simple and quick way JavaScript gives us to extract data from that object and store it in a variable. With this, you can get one or more variables from that object in a single line. Before the ES6 revision, if you needed ...

Markdown supported · ⌘↵ to post
Matheus Ribeiro
Benoît Bouré
Software developer
Awesome trick! I've been looking for a way to do this for a long time!
Thanks!