Grokking Advanced JavaScript
Ask Author
Back to course home

0% completed

JavaScript - Rest Parameter
Table of Contents

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

The Rest Parameter syntax in JavaScript allows a function to accept an indefinite number of arguments, providing a way to handle function parameters more flexibly. Introduced in ECMAScript 2015 (ES6), this feature enhances the capability to deal with multiple parameters without specifying each one individually in the function definition.

Basic Syntax

To declare a function using a rest parameter, use three dots (...) followed by the name of the array that will contain all remaining arguments passed to the function.

.....

.....

.....

Like the course? Get enrolled and start learning!

Table of Contents

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible