set default value in javascript variable 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
}