O'Reilly logo

Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond by JD Isaacks

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lesson 11. Destructuring

After reading lesson 11, you will

  • Know how to destructure objects
  • Know how to destructure arrays
  • Know how to combine array and object destructuring
  • Understand what types can be destructured

JavaScript, like other programming languages, has data structures like objects and arrays that allow you to structure data into logical groups and treat them as a single piece of data. JavaScript has always supported the concept of structuring, which is a concise syntax for taking several pieces of data and arranging them into a data structure. But that’s only half of the story: JavaScript has always been missing the reverse, a syntax for taking an existing data structure and destructuring it back into the parts that make it up. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required