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:
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.