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

javascript - Quick question about ES6 spread operator on objects - Stack Overflow
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
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
๐ŸŒ forum.freecodecamp.org
2
0
March 22, 2021
What is JavaScript's spread operator (...), and how is it used?
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. More on mindstick.com
๐ŸŒ mindstick.com
0
June 19, 2024
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
๐ŸŒ
DEV Community
dev.to โ€บ marinamosti โ€บ understanding-the-spread-operator-in-javascript-485j
Understanding the Spread Operator in JavaScript - DEV Community
September 23, 2019 - Another great way to use the spread operator is to make a copy of an array or an object. In JavaScript when you assign an object or array to a variable you're actually storing something called the "pointer", which sort of works like the address of where that object is being stored.
๐ŸŒ
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
๐ŸŒ
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 - While the spread operator expands an array or object into its individual elements, the rest operator does the opposite, collecting multiple elements or properties into a single array or object.
๐ŸŒ
Telerik
telerik.com โ€บ blogs โ€บ rest-spread-operators-explained-javascript
Rest and Spread Operators Explained in JavaScript
February 27, 2024 - The rest and spread operators are two of the advanced features introduced in ES6, allowing us to spread out and mix several elements. These two operators havenโ€™t received as much attention in recent development, yet they play a significant role in writing clean and efficient code.
Find elsewhere
๐ŸŒ
Codefinity
codefinity.com โ€บ blog โ€บ Understanding-the-Spread-and-Rest-Operators-in-JavaScript
Understanding the Spread and Rest Operators in JavaScript
A: The spread operator (...) is used to expand an array or object into its individual elements or properties. Q: What is the rest operator in JavaScript?
๐ŸŒ
Codesmith Enterprise
codesmith.io โ€บ blog โ€บ perfecting-javascripts-spread-rest-and-default-parameters
Codesmith | Perfecting JavaScript's Spread, Rest, and Default Parameters
TLDR - Perfecting JavaScript's Spread, Rest, and Default Parameters Spread Operator : Expands iterables (arrays, strings, sets) into individual elements for function calls, arrays, or objects.
๐ŸŒ
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.
๐ŸŒ
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.
๐ŸŒ
Medium
medium.com โ€บ @slamflipstrom โ€บ conditional-object-properties-using-spread-in-javascript-714e0a12f496
Conditional Object Properties Using Spread in JavaScript | by Sam Lindstrom | Medium
June 6, 2019 - While recently browsing Stack Overflow, ... ES6โ€™s spread syntax. The spread operator ( ... ) allows us to expand iterables into function calls, array literals, and object literals โ€” if youโ€™re using ES2018....
๐ŸŒ
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.
๐ŸŒ
freeCodeCamp
forum.freecodecamp.org โ€บ programming
What actually IS the spread operator? - Programming - The freeCodeCamp Forum
March 22, 2021 - 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.
๐ŸŒ
Gorilla Sun
gorillasun.de โ€บ blog โ€บ introduction-to-the-javascript-spread-operator
An Introduction to the Javascript Spread Operator
June 4, 2023 - As it's name suggests, the spread operator in javascript allows us to expand the elements of an iterable into places where multiple elements are expected. This is done via the spread syntax - the spread operator being represented by three ...
๐ŸŒ
W3Schools
w3schools.com โ€บ jsref โ€บ jsref_oper_spread.asp
JavaScript Spread Operator
The Spread Operator (...) spreads iterables into individual elements. The ... operator can pass arguments to functions: const numbers = [23,55,21,87,56]; let minValue = Math.min(...numbers); let maxValue = Math.max(...numbers); Try it Yourself ...
๐ŸŒ
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.
๐ŸŒ
DEV Community
dev.to โ€บ nyagarcia โ€บ understanding-the-javascript-spread-operator-from-beginner-to-expert-5bdb
Understanding the JavaScript Spread Operator - From Beginner to Expert - DEV Community
September 27, 2019 - The spread operator 'โ€ฆ' was first introduced in ES6. It quickly became one of the most popular features. This tutorial will show you how and when to use it.. Tagged with javascript, beginners, webdev, codenewbie.
๐ŸŒ
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.
๐ŸŒ
Codecademy
codecademy.com โ€บ docs โ€บ javascript โ€บ spread operator
JavaScript | Spread Operator | Codecademy
January 8, 2025 - The Spread Operator in JavaScript, represented by three dots (...), is used to expand or unpack elements of arrays, objects, or other iterables into individual elements.