mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-11-29 18:37:18 +08:00
* refactor: clean to roadmap content * refactor: move shared helpers into scripts/lib
7 lines
478 B
Markdown
7 lines
478 B
Markdown
# Rest
|
|
|
|
The rest parameter syntax allows a function to accept an indefinite number of arguments as an array. It is defined by prefixing the last parameter with `...`, such as `function sum(...numbers)`. Unlike the `arguments` object, rest parameters are a true array and work with arrow functions.
|
|
|
|
Visit the following resources to learn more:
|
|
|
|
- [@article@Rest Parameters - MDN Docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters) |