The ES6 way

default values and using a variable number of arguments in functions

We'll cover the following

ES6 supports default values. Whenever an argument is not given, the default value is substituted. The syntax is quite compact:

Get hands-on with 1400+ tech skills courses.