Destructuring in JavaScript

Arrow FunctionsSpread & Rest

Destructuring assignment is a convenient syntax that lets you unpack values from arrays or properties from objects into distinct variables. It makes code shorter and more readable.

It's especially useful when working with function returns, API data, or configuration objects.

Array Destructuring

Extract values by position.

Skip values with commas or use rest (...) for remaining items.

Object Destructuring

Extract properties by name.

Rename variables or provide defaults.

Nested Destructuring

Function Parameters

Quick Quiz

We have reviewed and checked the materials, but errors may still occur. The content is provided for educational purposes only, so use it at your own responsibility and verify with other sources if needed.

✨ Ask Lara — your AI study partner

Unlock personalized learning support. Lara can explain lessons, summarize topics, and answer your study questions — available from the Go plan and above.


Lara helps you learn faster — exclusive to ReadyTools Go, Plus, and Max members.

Track Your Progress 🚀

Learn more easily by tracking your progress completely for free.