javascript parameter not passed code example
Example 1: javascript check if argument is passed
function func(arg1, arg2) {
if (typeof arg2 === "undefined") {
arg2 = "defaultValue";
}
//Rest of function
}
Example 2: how to check for missing parameter javascript
a = a || "AAA";