Returns the value if defined or the provided default value. This useful for optional parameters of functions.
the original value
the default value
Use the ECMAScript 6 default parameter value syntax instead
Returns the value if defined or the provided default value. This useful for optional parameters of functions.