JavaScript Destructuring

Posted by Joe Enos on May 11, 2021 · 1 min read

Destructuring allows you to take an object or array, and pull pieces of it out into local variables.

This can be useful to keep code more readable and avoid holding a reference to an object when you don't need it any longer.

You can use this in both JavaScript and TypeScript.

View code on GitHub