Re:JavaScript: The Curious Case of null >= 0
by catnaroek on Saturday September 09, 2017 @05:04PM
(#15209150)
It's perfectly okay for a Boolean algebra to have four values. The two extra values can't behave the way JavaScript's “null” and “undefined” do, though.
No three-valued Boolean algebra exists.
Now, if you don't know the type of x and try to use it as boolean without being careful, it might look like it has four values. That comes partly from being dynamically typed and partly from performing coercion instead of throwing errors. So one might argue that Javascript encourages people to write code that's not careful, or that it's very clumsy to write careful code in Javascript, but saying booleans have four values is just nonsense.