Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How to Check for Null in JavaScript

let myStr = null;

if (myStr === null) {
  console.log("This is a null string!");
}

/*
This will return:

"This is a null string!"
*/
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #How #Check #Null #JavaScript
ADD COMMENT
Topic
Name
3+1 =