JSFiddle - React, Tailwind, and code Playground
JavaScript
var foo = false;
// outputs undefined
console.log(foo)
// typecast to non-inverted boolean
console.log(!!foo);
if (!!foo == false) {
console.log("Matches for foo undefined, foo = 0 and foo = false");
} else {
console.log("Matches for foo = 1 and foo = true");
}