MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Operators › Spread_syntax
Spread syntax (...) - JavaScript | MDN
May 22, 2026 - The spread (...) syntax allows an iterable, such as an array or string, to be expanded in places where zero or more arguments (for function calls) or elements (for array literals) are expected. In an object literal, the spread syntax enumerates the properties of an object and adds the key-value ...
W3Schools
w3schools.com › react › react_es6_spread.asp
React ES6 Spread Operator
The JavaScript spread operator (...) copies all or part of an existing array or object into another array or object. const numbersOne = [1, 2, 3]; const numbersTwo = [4, 5, 6]; const numbersCombined = [...numbersOne, ...numbersTwo]; ... The ...
Quick question about ES6 spread operator on objects
I just have a brief question about using spread operators on objects, when we are trying to return a copy of the object with a field changed. I've been working through a PluralSight tutorial having... More on stackoverflow.com
What actually IS the spread operator?
Tell us what’s happening: I have passed the test, but I don’t understand why. What exactly is the spread operator?? This definition is given: ES6 introduces the spread operator, which allows us to expand arrays and other expressions in places where multiple parameters or elements are expected. More on forum.freecodecamp.org
is spread operator the same as spread syntax?
Yes. Strictly speaking, spreading is not an operator: An operator derives a value from operands. In contrast, spreading is part of: Object literals. Then it’s called a spread property. Array literals: spread element Argument lists: spread argument “Spread syntax” works as an umbrella term for all three. More on reddit.com
What is JavaScript's spread operator (...), and how is it used?
This operator is useful for various purposes, including array and object manipulation, function arguments, and more. Here’s a detailed explanation of how the spread operator can be used: More on mindstick.com
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-spread-operator
JavaScript Spread Operator - GeeksforGeeks
The spread operator (...) in JavaScript provides a simple and expressive way to expand elements from arrays, strings, or objects. It helps make code cleaner by reducing the need for manual copying or looping.
Published January 16, 2026
Jonlinnell
jonlinnell.co.uk › articles › spread-operator-performance
How slow is the Spread operator in JavaScript? | Jon Linnell
August 17, 2022 - My semi-educated guess, given the disparity in timings we see, is that the spread operator is iterating one-by-one through each element, assigning each one to a new space in memory in sequence.
Top answer 1 of 2
7
let original = {name: 'Joel', favoriteFood: 'oranges', age: 26};
let happyBirthday = {...original, age: 27};
happyBirthday will be an object that is identical to original but with the age overwritten.
So that would result in an object like this:
{name: 'Joel', favoriteFood: 'oranges', age: 27} // Notice the age
2 of 2
5
Objects cannot have duplicate keys. If you assign a key to an object when that object already has said key, or write an object initializer with duplicate keys, the prior value at that key will be overwritten:
const obj = {
foo: 'foo',
bar: 'bar',
};
obj.foo = 'new';
console.log(obj);
const obj = {
foo: 'foo',
bar: 'bar',
foo: 'new',
};
console.log(obj);
When using object spread, the same sort of thing is going on. If you add a key-value pair when a prior key already exists in the object initializer (by spread or otherwise), the prior value will be overwritten.
let happyBirthday = {...original, age: 27};
is very similar to
// Create a new object with all properties of `original`:
let happyBirthday = Object.assign({}, original);
// Assign to the `age` property of the new object:
happyBirthday.age = 27;
Reddit
reddit.com › r/learnjavascript › is spread operator the same as spread syntax?
r/learnjavascript on Reddit: is spread operator the same as spread syntax?
June 6, 2021 -
doing a lesson on spread operator and need to know if they're the same thing
Top answer 1 of 2
9
Yes. Strictly speaking, spreading is not an operator: An operator derives a value from operands. In contrast, spreading is part of: Object literals. Then it’s called a spread property. Array literals: spread element Argument lists: spread argument “Spread syntax” works as an umbrella term for all three.
2 of 2
2
The ... thing honestly has a lot of confusion around what to call it and when, and to be quite honest plenty of developers do not always use the right words. It's not necessarily an "operator" in the same way a semi-colon isn't necessarily an "operator", but plenty of people will call it an "operator" anyway. People will also use the words "spread" and "rest" somewhat interchangeably when referring to the ... where the distinction is really that when used to "spread" some elements in an array or an object, the word to use is "spread". But when it represents the "rest" of the arguments a function is taking in, you could call it a "rest parameter". It also could be referred to as "rest" when destructuring an array because it gets the "rest" of the thing. If you would like to read some nerds arguing about these things, this link will be helpful: https://stackoverflow.com/questions/44934828/is-it-spread-syntax-or-the-spread-operator
MindStick
mindstick.com › forum › 160760 › what-is-javascript-s-spread-operator-and-how-is-it-used
What is JavaScript's spread operator (...), and how is it used? – MindStick
June 19, 2024 - The spread operator (...) in JavaScript is a syntax that allows an iterable (such as an array or string) or an object to be expanded in places where multiple elements or key-value pairs are expected.
Programiz
programiz.com › javascript › spread-operator
JavaScript Spread Operator
The JavaScript spread operator (...) allows an iterable to be expanded in places where zero or more arguments or elements are expected. In this tutorial, you will learn about the JavaScript spread operator with the help of examples.
W3Schools
w3schools.com › jsref › jsref_oper_spread.asp
W3Schools.com
Equal Strict Equal Not Equal Strict Not Equal Greater Than Less Than Greater Equal Less Equal JS Logical Operators
Reddit
reddit.com › r/javascript › two exceptional use cases for the spread operator you may not know of
r/javascript on Reddit: Two exceptional use cases for the spread operator you may not know of
September 20, 2019 - I agree, it's less readable (and less understandable for JS beginners). This is an unhealthy obsession with going from 5 lines of code to 3 lines, while sacrificing readability and maintainability. There's a reason why code golf is a code smell. ... IMO, the point of using the spread operator in this way isn't to reduce lines of code but to make it easier to write functional code without mutations.
freeCodeCamp
forum.freecodecamp.org › programming › javascript
ES6: Use the Spread Operator to Evaluate Arrays In-Place
July 17, 2020 - I’m having some difficulty in understanding the use of the spread operator in the lesson where it’s introduced. I’ve played around with it, and understand how it’s used in the example, however, I don’t understand the application in the exercise. The new array arr2 doesn’t return a spread array: it’s an array which is identical to arr1.
Mimo
mimo.org › glossary › javascript › spread-operator
JavaScript Spread Operator: Syntax, Usage, and Examples
Use the JavaScript spread operator (...) to expand arrays, objects, and strings, copy and merge data, update state immutably, and pass values into functions, with practical examples and common pitfalls.