Yes. Spread expands an array into individual arguments. For example, Math.max(...[1, 2, 3]) is the same as Math.max(1, 2, 3).
Function Parameters and Arguments in JavaScript
Can you use spread in a function call in JavaScript?
The answer
More FAQs in Function Parameters and Arguments in JavaScript
Parameters are the variable names listed in the function definition. Arguments are the actual values passed to the function when it is called.
If the caller passes undefined or omits the argument, the default value is used. Other falsy values like 0, null, or empty string do not trigger the default.
Rest parameters (...args) collect remaining arguments into a true array with methods like map and filter. arguments is array-like (has length and indices) but lacks array methods, and is not available in arrow functions.
Still have questions?
Browse all our FAQs or reach out to our support team
Want to upskill yourself?
Your learning library
Small steps. Big possibilities.
Find your next course. Build something great.