not is null js code example
Example 1: javascript not null
if (variable !== null) {
console.log("Var is NOT null");
}
Example 2: javascript is not null
if(data !== null && data !== '') {
// do something
}
if (variable !== null) {
console.log("Var is NOT null");
}
if(data !== null && data !== '') {
// do something
}