ES6 Destructuring Assignment
Destructuring Assignment is an amazing feature introduced with EcmaScript 2016, which is now available in both browsers and Node.js.
If you’re writing CommonJs or ES6 modules, you’re probably already using it! Let’s pretend we have a file called
math.js, where we have a bunch of functions to be exported: