Object Destructuring
Object destructuring is a concise syntax for extracting properties from an object into named local variables. Unlike array destructuring which uses position, object destructuring uses property names, so the variable order does not matter.
Basic Syntax
Wrap the property names in curly braces on the left side of an assignment. To store a property under a different variable name, use propertyName: localName.
Default Values
Add = defaultValue after a property name to supply a fallback when the property is undefined.
Nested Destructuring
You can destructure nested objects in a single expression by mirroring the object structure on the left side.
In Function Parameters
Destructuring is especially powerful in function signatures — it makes the expected shape of an argument explicit and gives each extracted property a meaningful local name without boilerplate.