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
Answer from Pedro Filipe on Stack Overflow
🌐
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.
Discussions

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
🌐 stackoverflow.com
Spread Operator vs Rest Parameter
Console log is a good example of the rest one for anyone struggling to think of it. You've probably written console.log(1, 2, 3, 4) etc in the past, that is to say you can pass any number of arguments into the function and it will be ok with it More on reddit.com
🌐 r/learnjavascript
26
290
September 16, 2022
spread vs rest syntax in JS, a little confused.
the teacher said that the spread operator is on the right side of the "=" This seems like a really bad way of describing things. The "rest" operator appears inside of parameter lists (like in your example), or inside a destructuring declaration (like let [a, ...b] = [1, 2, 3]). It occurs where variables are being created. The "spread" operator is used when you want to "spread"/flatten the data you have into another structure. That can occur inside argument lists (some_func(...data)), or inside of something like an array ([1, 2, 3, ...someData, 4, 5, 6]). In both cases, the placement of the = is irrelevant. More on reddit.com
🌐 r/learnprogramming
4
1
July 14, 2022
[AskJS] Who first used the term "spread operator" re spread syntax ...?

It was me. I coined the term “spread operator”.

It was a lonely night in 1993. I was angry at the world and I needed an outlet. I thought that by introducing an incorrect term to the javascript community, I could spread some of my pain to save myself at the expense of others.

I had no idea the impact I was going to cause on the javascript community and the world at large. I am horrified to witness you suffering from my mistake all these years later. I am truly sorry. I would do anything to go back and fix things.

Is there any way you could forgive me?

More on reddit.com
🌐 r/javascript
102
0
September 18, 2022
🌐
DEV Community
dev.to › marinamosti › understanding-the-spread-operator-in-javascript-485j
Understanding the Spread Operator in JavaScript - DEV Community
September 23, 2019 - Disclaimer. The spread operator is an ES6 feature, and thus is not supported in every browser (IE strikes again). However you can rest assured that it will work on all major and modern browsers.
🌐
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
🌐
Telerik
telerik.com › blogs › rest-spread-operators-explained-javascript
Rest and Spread Operators Explained in JavaScript
February 27, 2024 - This code sample summarizes our definition of rest: The rest operator combines elements or arguments of a function into an array. The spread operator divides an array or object into separate elements or properties.
Find elsewhere
🌐
Medium
medium.com › @anton.martyniuk › spread-and-rest-operators-in-javascript-a5d1f1ee60dd
Spread and Rest Operators in JavaScript | by Anton Martyniuk | Medium
March 21, 2024 - The syntax of spread operator is using three dots (…), and it allows to expand an array or object into its individual elements. Imagine you have two arrays and you want to combine them into a single array.
🌐
Medium
medium.com › @mojahidulislamt17 › es6-in-javascript-spread-operator-destructuring-and-more-693b7c0b5a7a
ES6 in JavaScript: Spread Operator, Destructuring, and More | by Mojahidul Islam | Medium
August 5, 2025 - The spread operator (...) allows you to expand or spread elements of an iterable (like an array or object) into individual elements.
🌐
JavaScript.info
javascript.info
The Modern JavaScript Tutorial
Constructor, operator "new" Optional chaining '?.' Symbol type · Object to primitive conversion · Data types · Methods of primitives · Numbers · Strings · Arrays · Array methods · Iterables · Map and Set · WeakMap and WeakSet · Object.keys, values, entries · Destructuring assignment · Date and time · JSON methods, toJSON · More… · Advanced working with functions · Recursion and stack · Rest parameters and spread syntax ·
🌐
Medium
medium.com › @chirag.softpoint › javascript-spread-operator-rest-pattern-introduced-in-es6-d36b523da70f
JavaScript Spread Operator (…) & Rest Pattern — Introduced in ES6 | by Chirag26 | Medium
September 19, 2023 - JavaScript Spread Operator (…) & Rest Pattern — Introduced in ES6 The spread operator (…) allows to expand elements from iterable e.g. an array or string literals. The most common use cases of …
🌐
RAZINJ Dev
razinj.dev › javascript-spread-syntax
Javascript's Spread Syntax
May 11, 2023 - The spread syntax allows us to concatenate multiple lists or objects in a simple syntax, Let's see the code.
🌐
JavaScript in Plain English
javascript.plainenglish.io › understanding-rest-and-spread-operator-es6-guide-e27a9a647dc3
Understanding Rest and Spread Operator | ES6 Guide | by Deepak Kumar | JavaScript in Plain English
January 3, 2020 - In Rest Parameter We were collecting the list of arguments into an array, while with spread operator we can unpack the array elements.
🌐
SoftTeco
softteco.com › home › blog
Information Technology (IT) Blog [300+ Articles]
September 18, 2023 - Explore SoftTeco's blog for IT insights. Check articles on information technology trends, find expert opinions, and learn about business tech solutions.
🌐
freeCodeCamp
freecodecamp.org › news › javascript-spread-and-rest-operators
JavaScript Spread and Rest Operators – Explained with Code Examples
February 8, 2024 - You can get all the source code from here. ... The spread operator, denoted by three consecutive dots (...), is primarily used for expanding iterables like arrays into individual elements.
🌐
DEV Community
dev.to › sujithvsuresh › rest-and-spread-operator-in-javascript-es6-3gd8
Rest and Spread operator in JavaScript | ES6 - DEV Community
September 9, 2022 - Spread Operator Spread operator helps us to copy all the elements inside array or objects. After...
🌐
Webpedia
webpedia.net › how-to-use-the-spread-operator-in-javascript
How to Use the Spread Operator (…) in JavaScript? - WebPedia.net
August 17, 2023 - Using the spread operator we can get all the arguments passed to a function as an array and also pass an array of values to a function as arguments.
🌐
NestJS
docs.nestjs.com › security › authentication
Documentation | NestJS - A progressive Node.js framework
Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).
🌐
MDN
mdn2.netlify.app › en-us › docs › web › javascript › reference › operators › spread_syntax
Spread syntax (...) - JavaScript | MDN
March 25, 2022 - Spread syntax (...) allows an iterable such as an array expression or string to be expanded in places where zero or more arguments (for function calls) or elements (for array literals) are expected, or an object expression to be expanded in ...
🌐
GitBook
basarat.gitbook.io › typescript › future-javascript › spread-operator
Spread Operator | TypeScript Deep Dive
December 31, 2019 - The main objective of the spread operator is to spread the elements of an array or object.