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}
1let id;
2
3if(typeof id === 'undefined') {
4 console.log("id is undefined...");
5}