SyntaxFix
Write A Post
Hire A Developer
Questions
Note that typeof always returns a string, and doesn't generate an error if the variable doesn't exist at all.
function A(val){ if(typeof(val) === "undefined") //do this else //do this }