openmind
Published in

openmind

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:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Michele Riva

Michele Riva

1.2K Followers

Senior Architect at NearForm · Microsoft MVP · Google GDE · Twitter: @MicheleRivaCode