Hackerss.com

hackerss
hackerss

Posted on

Javascript Check if a variable is not null


//create a variable
var myVariable;

//check if the variable is not null
if (myVariable != null) {
  //if the variable is not null, do something
}

//output
//if the variable is not null, do something


Enter fullscreen mode Exit fullscreen mode

Top comments (0)