Your files never leave your device
Advertisement

Destructuring

Destructuring is a convenient syntax for extracting values from arrays or objects into distinct variables.

Object Destructuring

Extract properties by their names.

Try It Yourself

        

Array Destructuring

Extract values by their position.

Try It Yourself

        

Practice

Challenge 1: Create an object with 3 properties, then destructure two of them into variables.

Related Guides

Sponsored Utility
While You're Here
Sponsored Recommendations
Advertisement