- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
With rest parameter, you can represent a number of arguments as an array. ES6 brought rest parameter to ease the work of developers. For arguments objects, rest parameters are indicated by three dots … and precedes a parameter.
Here is the difference between rest parameters and the arguments object.
- Arguments object includes all arguments passed to the function, whereas rest parameters are those, which are not given another name.
- The rest parameters are Array instances, whereas arguments object isn’t an array. Array instances are the following methods: map, sort, pop, etc
- What is the difference between object and reference in java?
- What is the difference between pass by value and reference parameters in C#?