Easy JavaScript Part 3: What Is a Default Parameter in a Function?

A JavaScript function can have default parameter values. Using default function parameters, you can initialize formal parameters with default values. If you do not initialize a parameter with some value, then the default value of the parameter is undefined.
Let us consider the code listed below:

Link: https://dzone.com/articles/easy-javascript-part-3-what-is-a-default-parameter?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+dzone%2Fwebdev