Question · JavaScript and TypeScript course · Module 2: Functions, Arrays and Objects
Rest - Function Parameters
Where must the rest parameter (...args) be in the function parameter list?
Answer options
- At the beginning of the parameter list
- Anywhere in the parameter list
- At the end of the parameter list - as the last parameter
- Before the first named parameter
Show the answer
Correct answer:
- At the end of the parameter list - as the last parameter