Java Script - Convert To Boolean
We can easily switch between true and false by using the negative operator 1, which will also convert the type to "boolean".
const isTrue = !0;
const isFalse = !1;
const alsoFalse = !!0;
console.log(isTrue); // Result: true
console.log(typeof true); // Result: "boolean"
This kind of type conversion can be handy in conditional statements, although the only reason you'd choose to define false as !1 is if you were playing code golf!