JavaScript & TypeScript

Spread Operator

/spred ˈɒpəreɪtər/

Definition

The ... syntax expanding an array or object's elements into another array or object.

Example in context

"const updated = { ...user, email: newEmail } creates a new object with all user properties plus the new email."

Related terms

Practice this term

Master Spread Operator 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.