1if(typeof comment === 'undefined') {
2
3 alert('Variable "comment" is undefined.');
4
5} else if(comment === null){
6
7 alert('Variable "comment" is null.');
8
9}
1if (typeof myFlag !== "undefined") {
2 // comes here whether myFlag is true or false but not defined
3}