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 Web Docs - Mozilla
May 22, 2026 - The spread (...) syntax allows ... array literals) are expected. In an object literal, the spread syntax enumerates the properties of an object and adds the key-value pairs to the object being created....
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-spread-operator
JavaScript Spread Operator - GeeksforGeeks
The spread operator (...) with objects is used to create copies of existing objects with new or updated values or to make a copy of an object with more properties. Let's take an example of how to use the spread operator on an object, ... Here ...
Published   January 16, 2026
Discussions

javascript - Quick question about ES6 spread operator on objects - Stack Overflow
Bring the best of human thought and AI automation together at your work. Explore Stack Internal ... Save this question. Show activity on this post. 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. More on stackoverflow.com
🌐 stackoverflow.com
Adding arbitrary attributes to object using spread operator
It’s not really a bug. If they performed excess property checks with spreading, the resulting errors would be very awkward to work around. Generally, typescript doesn’t care about excess properties. This is why Object.keys emits strings and not keyof T. More on reddit.com
🌐 r/typescript
4
2
April 25, 2024
C# 12 spread operator in practice
I'm convinced this is a feature I'm going to see in Reddit threads by confused newbies 99.9999% more than in discussions of solutions to a problem. More on reddit.com
🌐 r/csharp
20
50
January 10, 2024
Items is not iterable in spread operator?
Show the parameter you are passing in as the items More on reddit.com
🌐 r/reactjs
14
0
October 12, 2022
🌐
W3Schools
w3schools.com › react › react_es6_spread.asp
React ES6 Spread Operator
React Compiler React Quiz React Exercises React Syllabus React Study Plan React Server React Interview Prep React Bootcamp ... The JavaScript spread operator (...) copies all or part of an existing array or object into another array or object.
🌐
Kinsta®
kinsta.com › home › resource center › blog › javascript tutorials › unleashing the power of javascript spread operator
Unleashing the Power of JavaScript Spread Operator - Kinsta®
October 1, 2025 - The spread operator in JavaScript is a syntax introduced in ECMAScript 6 (ES6) that allows you to spread the elements of an iterable (such as arrays, strings, or objects), into another iterable or function call.
🌐
DigitalOcean
digitalocean.com › community › tutorials › js-spread-operator
What's the Spread Operator Used For in JavaScript? | DigitalOcean
July 11, 2022 - The spread operator is a feature of JavaScript introduced with ES6 that gives you access to the insides of an iterable object. An “iterable object” is anything you can iterate over item by item, such as arrays, objects literals, and strings. These kinds of JavaScript types can be traversed ...
🌐
Medium
medium.com › @pratyushpavanchoudhary › js-spread-operator-4423577f06a2
JS SPREAD (...) OPERATOR. Developers are using the JavaScript… | by Pratyush Pavan | Medium
August 26, 2024 - The spread operator (...) in JavaScript allows an iterable (such as an array or object) to be expanded into individual elements.
Find elsewhere
🌐
DEV Community
dev.to › marinamosti › understanding-the-spread-operator-in-javascript-485j
Understanding the Spread Operator in JavaScript - DEV Community
September 23, 2019 - Spread syntax allows an iterable ... array literals) are expected, or an object expression to be expanded in places where zero or more key-value pairs (for object literals) are expected....
🌐
JavaScript Tutorial
javascripttutorial.net › home › javascript tutorial › javascript object spread
JavaScript Object Spread Operator (...) - JavaScript Tutorial
November 4, 2024 - The spread operator (...) can be used to merge two or more arrays into one as shown in the following example: let rgb = [ 'red', 'green', 'blue' ]; let cmyk = ['cyan', 'magenta', 'yellow', 'black']; let merge = [...rgb, ...cmyk]; console.lo...
🌐
Stack Abuse
stackabuse.com › spread-operator-in-javascript
Spread Operator in JavaScript
August 24, 2023 - As we can see, the arr2 wasn't passed a reference like before, but rather it was populated with the values of arr1 as a whole new object. So even when arr1 changes, arr2 remains the same. We can also use the spread operator to create a copy of an array and add new elements into it at the same time:
🌐
Dillion's Blog
dillionmegida.com › p › spread-operator-simplified
Spread Operator in JavaScript, Simplified - Dillion's Blog
The spread operator is used to unroll (to "spread", like butter on bread 😂) the individual elements of an iterable object or array (iterable collection), separated by a comma, into another collection.
🌐
RGB Studios
rgbstudios.org › blog › js-spread-operator
Understanding the JavaScript Spread Operator | RGB Studios
May 1, 2024 - This method offers fine-grained ... JavaScript spread operator (...) simplifies working with arrays and objects by enabling copying, merging, and spreading elements into function arguments....
🌐
Programiz
programiz.com › javascript › spread-operator
JavaScript Spread Operator
The JavaScript spread operator ... is used to expand or spread out elements of an iterable, such as an array, string, or object. This makes it incredibly useful for tasks like combining arrays, passing elements to functions as separate arguments, or even copying arrays.
🌐
SitePoint
sitepoint.com › blog › javascript › quick tip: how to use the spread operator in javascript
Quick Tip: How to Use the Spread Operator in JavaScript — SitePoint
November 7, 2024 - The JavaScript spread operator, symbolized by three dots (…), was introduced in ES6 and can be used to expand elements in collections and arrays into single, individual elements.
🌐
W3Schools
w3schools.in › javascript › spread-operator
JavaScript Spread Operator - W3Schools
The spread operator, represented by three dots (...), expands elements of an iterable (like arrays) or object properties. It was introduced in ES6 and has become a staple in JavaScript programming for its simplicity and efficiency.
🌐
W3Schools
w3schools.com › howto › howto_js_spread_operator.asp
How To Use the Spread Operator (...) in JavaScript
The JavaScript spread operator (...) expands an iterable (like an array) into more elements.
🌐
Medium
eleftheriabatsou.medium.com › javascript-spread-operator-explained-with-examples-a38caf568ffd
JavaScript Spread Operator Explained (with Examples) | by Eleftheria Batsou | Medium
September 30, 2024 - In this case, ...numbers collects ... the ... syntax, they serve different purposes: Spread Operator: Expands an array or object into its individual elements....
🌐
JavaScript Tutorial
javascripttutorial.net › home › javascript array methods › javascript spread operator
The Practical Usages of JavaScript Spread Operator
May 8, 2024 - When we applied the spread operator ... is denoted by three dots (...). The spread operator unpacks elements of iterable objects such as arrays, sets, and maps into a list....
🌐
Educative
educative.io › answers › what-is-the-spread-operator-in-javascript
What is the spread operator in JavaScript?
The spread operator is commonly used to make deep copies of JS objects. When we have nested arrays or nested data in an object, the spread operator makes a deep copy of top-level data and a shallow copy of the nested data.
🌐
Medium
cleverzone.medium.com › demystifying-javascript-spread-operat-71924c888a8
Demystifying JavaScript : Spread operator (…) | by Abhijeet Kumar | Medium
August 26, 2023 - In this article, we will explore ... denoted by three dots (...), allows JavaScript developers to easily split array elements or object properties and spread them into a new array or object....