I have a way of thinking which makes it very easy to understand and remember how '...' works.

var arr = [1,2,3] // this is arr which is the array

on the other hand

...arr            // this is whatever inside arr, which is 1,2,3

So you can also think of it as taking what is inside of an array.


Note that by its own, ...arr is not a valid syntax. You can use it in many ways , two of them coming to my mind are :

1 - Pass what is inside an array to a function

var arr = [ 1,2,3 ]
var myFunc = function(a,b,c) {
  console.log(a,b,c)
}
myFunc(..arr)   // logs 1 2 3

myFunc(1,2,3)   // logs 1 2 3

2 - Take what is inside of an array and use them in another array.

var arr = [ 1,2,3 ]
var foo = [ ...arr, 4,5,6 ] // now foo is [ 1,2,3,4,5,6 ]
Answer from FurkanO on Stack Overflow
🌐
Mozilla
developer.mozilla.org › en-US › docs › Web › JavaScript › Guide › Expressions_and_operators
Expressions and operators - JavaScript | MDN
For example, x++ or ++x. The operator operand form is called a prefix unary operator, and the operand operator form is called a postfix unary operator. ++ and -- are the only postfix operators in JavaScript — all other operators, like !, typeof, etc.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Operators › in
in - JavaScript | MDN
The in operator returns true if the specified property is in the specified object or its prototype chain.
🌐
W3Schools
w3schools.com › js › js_operators.asp
JavaScript Operators
Assignment operators assign values to JavaScript variables. The Addition Assignment Operator (+=) adds a value to a variable. ... Assignment operators are fully described in the JS Assignment chapter.
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-operators
JavaScript Operators - GeeksforGeeks
JavaScript operators are symbols or keywords used to perform operations on values and variables. They are the building blocks of JavaScript expressions and can manipulate data in various ways.
Published   July 30, 2025
🌐
TutorialsPoint
tutorialspoint.com › javascript › javascript_operators.htm
JavaScript - Operators
In JavaScript, an operator is a symbol that performs an operation on one or more operands, such as variables or values, and returns a result. Let us take a simple expression 4 + 5 is equal to 9. Here 4 and 5 are called operands, and + is called the operator.
🌐
Programiz
programiz.com › javascript › operators
JavaScript Operators (with Examples)
JavaScript operators are special symbols that perform operations on one or more operands (values). In this tutorial, you will learn about JavaScript operators with the help of examples.
🌐
Reddit
reddit.com › r/javascript › javascript's ??= operator
r/javascript on Reddit: JavaScript's ??= Operator
November 5, 2024 - Chat about javascript and javascript related projects. Yes, typescript counts. Please keep self promotion to a minimum/reasonable level. ... Let me blow your mind. There is also: &&= and ||= ... This guy coalesces. ... Which part of this should blow my mind? I tried it, but my mind didn't even flinch. ... |> operator, it’s so good.
Find elsewhere
🌐
W3Schools
w3schools.com › jsref › jsref_operators.asp
JavaScript Operators Reference
JavaScript Operators are used to assign values, compare values, perform arithmetic operations, and much more.
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-in-operator
JavaScript in Operator - GeeksforGeeks
December 24, 2025 - JavaScript in operator is an inbuilt operator which is used to check whether a particular property exists in an object or not.
🌐
freeCodeCamp
freecodecamp.org › news › javascript-operators
Learn JavaScript Operators – Logical, Comparison, Ternary, and More JS Operators With Examples
August 14, 2023 - It's enough to know what they are. In this tutorial, you've learned the 7 types of JavaScript operators: Arithmetic, assignment, comparison, logical, ternary, typeof, and bitwise operators.
🌐
javascript.com
javascript.com › learn › operators
Learn to use JavaScript operations with this free resource
JavaScript operator and JavaScript not operator are the symbols between values that allow different operations like addition, subtraction, multiplication, and more. JavaScript has dozens of operators, let’s focus on the ones you’re likely ...
🌐
JavaScript.info
javascript.info › tutorial › the javascript language › javascript fundamentals
Basic operators, maths
There are many operators in JavaScript. Every operator has a corresponding precedence number. The one with the larger number executes first.
🌐
Josh W. Comeau
joshwcomeau.com › operator-lookup
Operator Lookup - Search JavaScript Operators
Enter a JavaScript operator to learn more about it: Search for an operator
🌐
BrainStation®
brainstation.io › learn › javascript › operators
JavaScript Operators (2026 Tutorial & Examples) | BrainStation®
February 4, 2025 - It is highly recommended that Developers in JavaScript always use triple equal sign === or strict equality comparison. == sign compares only the values to be either truthy or falsy while === compares both the values and as well the type of both the values to be equal for a more strict comparison. Here are some of the other operators available in JavaScript:
🌐
Codecademy
codecademy.com › docs › javascript › operators
JavaScript | Operators | Codecademy
December 1, 2023 - An operator is a special character or series of characters that perform a task in JavaScript.
🌐
JavaScript.info
javascript.info › tutorial › the javascript language › javascript fundamentals
Logical operators
There are four logical operators in JavaScript: || (OR), && (AND), ! (NOT), ?? (Nullish Coalescing). Here we cover the first three, the ??
🌐
SitePoint
sitepoint.com › blog › javascript › demystifying javascript operators: what does that symbol mean?
Demystifying JavaScript Operators: What Does That Symbol Mean? — SitePoint
November 18, 2024 - For example, in the expression 5 + 3, + is the operator (the action of addition), and 5 and 3 are the operands — the numbers being added together. In JavaScript, operands can be of various types, such as numbers, strings, variables, or even more complex expressions.
🌐
freeCodeCamp
freecodecamp.org › news › the-javascript-in-operator-explained-with-examples
The JavaScript `in` Operator Explained With Examples
July 13, 2020 - This will return true, showing that the div element is an instance of the Object type, which is why the in operator can be used on it. You’ve learned about the not so popular JavaScript in operator, which is used to verify the presence of properties on an object or Object type instances.
🌐
Medium
medium.com › @atuljha2402 › understanding-javascript-operators-514600727b91
Understanding JavaScript Operators | by Atul jha | Medium
August 18, 2024 - Understanding JavaScript Operators Operators play a crucial role in programming by enabling us to perform various operations on data. In JavaScript, operators are symbols or keywords that allow us to …