Spread Syntax
noun
say it: “DOT DOT DOT” /dɒt dɒt dɒt/ or “SPRED SIN-taks” /sprɛd ˈsɪntæks/
Three dots (...) in front of an array or object that lay its items or properties out in place, to copy them, combine them, or pass them on one by one.
What is Spread Syntax in JavaScript?
Spread Syntax — The ... syntax that expands values from an iterable or properties from an object.
const original = ["Plan", "Build"];
const copy = [...original];
In a sentence
- “I used spread syntax to make a new pet object with every old property plus an adoption fee.”
Level: Apprentice · More JavaScript terms at this level
Updated