if (Var === null) {
//code goes here
}
let myStr = null;
if (myStr === null) {
console.log("This is a null string!");
}
/*
This will return:
"This is a null string!"
*/
null == null // true
null == undefined // true
null == 0 // false
const number = null;
if(!pass || !cpass || !email || !cemail || !user) {
// Code here
}
// Which will check for empty strings (""), null, undefined, false and the numbers 0 and NaN