It's important to remember that just because 0 is false, it doesn't mean other numbers will be true. For example, using === in a condition will result in false for all numbers.
(0 == true) // false
(1 == true) // true
Surprisingly, even without the not operator (!), the results can still be unexpected. If the condition is true, it should print true, otherwise false. Yet, you may still end up with the opposite outcome.
if(0){console.log("true")}else{console.log("false")} // false
if(1){console.log("true")}else{console.log("false")} // true
if(15){console.log("true")}else{console.log("false")} // true
However, converting numbers to Boolean will yield the expected results that align with your initial thoughts.
Boolean(0) == true // false
Boolean(1) == true // true
Boolean(2) == true // true
Boolean(othernumber) == true // true
Thank you