Checking undefined value
in Jquery
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
}
No comments:
Post a Comment