JavaScript & TypeScript

Destructuring

/dɪˈstrʌktʃərɪŋ/

Definition

Syntax that extracts values from arrays or properties from objects into distinct variables.

Example in context

"const { name, email } = user — destructs two properties in one line instead of user.name, user.email."

Related terms

Practice this term

Master Destructuring in context by working through exercises in the JavaScript & TypeScript module. You'll see the term used in real engineering scenarios with multiple-choice, fill-in-the-blank, and matching drills.