jskatas.org Continuously Learn JavaScript. Your Way.

Destructuring: object

Destructuring objects is a core concepts for modules and more.

Donate to NGO Julenka. Support Ukranians in need. Julenka is an NGO which my brother founded in 2011 to support Ukranian families and kids in need.

Destructure objects

  • by surrounding the left-hand variable with {}

nested

  • multiple objects
  • object and array
  • array and object

interesting

  • missing refs become undefined
  • destructure from builtins (string)