JSFiddle - React, Tailwind, and code Playground
JavaScript
var operand1;
var operand2 = null;
// first example:
if (operand1 == operand2) {
console.log('undefined equals to null ?! with == yes!');
}
// second example:
if (typeof operand1 != "undefined" && operand1 == operand2) {
console.log('typeof operand1 != "undefined');
}
// third example:
if (operand1 !== operand2) {
console.log('undefined doesnt equal to null ?! with ===');
}