How to check if a JavaScript variable is NOT undefined? [duplicate]

Things I’ve tried that don’t seem to work:

if(lastName != "undefined")
if(lastName != undefined)
if(undefined != lastName)

1 Answer
1

Leave a Comment