how to set a default value in javascript code example
Example: javascript default function parameter value
function multiply(a, b) {
b = (typeof b !== 'undefined') ? b : 1
return a * b
}
function multiply(a, b) {
b = (typeof b !== 'undefined') ? b : 1
return a * b
}