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}
1The undefined property indicates that a variable has not been assigned a value,
2or not declared at all.