💻ES6 tutorial: default parameter in javascript
JavaScript’s default parameters allow you to set a default value in case no value, or an undefined value, is provided when calling a function. This can be useful to avoid errors and make your code more concise.
To define a default parameter, you can...