Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript if undefined

if(typeof comment === 'undefined') {

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

} else if(comment === null){

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

}
Source by www.tutorialrepublic.com #
 
PREVIOUS NEXT
Tagged: #javascript #undefined
ADD COMMENT
Topic
Name
6+2 =