Les choses que j’ai essayées et qui ne semblent pas fonctionner:
if(lastName != "undefined")
if(lastName != undefined)
if(undefined != lastName)
var lastname = "Hi"; if(typeof lastname !== "undefined") { alert("Hi. Variable is defined."); }