Modern JavaScript
About Lesson

In this JavaScript lesson we are going to talk about Arrow Function Default Parameters, so we are going to use REST operator for adding default parameters in arrow functions.

 

 

As we have already talked that REST operator is used to handle function parameters, you can use three dot (…) for this. Rest operator signify that parameter is a placeholder for any number of arguments. and rest operator is used for handling function parameters. the best thing is this that the rest parameter is of Array type.

 

In the above example you can see that we have used REST operator with arrow function and we have added multiple arguments.

 

 

Now let’s create an example of default parameter with arrow function.

Thank you for visiting my website! If you enjoyed the free courses, please consider supporting my works on Patreon.
Exercise Files
No Attachment Found
No Attachment Found