undefined javascript check

JavaScript
if (typeof myVariable === 'undefined'){
    //myVariable is undefined
}if(myVar === null) {
	console.log("Element is undefined");
}if(typeof comment === 'undefined') {

  alert('Variable "comment" is undefined.');

} else if(comment === null){

  alert('Variable "comment" is null.');

}if(undefinedElement === null) {
	console.log("Element is undefined");
}javascript check number against undefinedif (query){
   doStuff();
}
Source

Also in JavaScript: