How does JS type coercion work?
I'm learning about == vs. === and came across this answer which was very helpful in understanding the concept. However I wondered about one of the examples: '0' == false // true This might make sense, since == doesn't check for type. But then I tried some possible coercions in the console and found the following: Boolean('0') // true String(false) // "false" I would have thought '0' == false has the same truth value as '0' === String(false) , but that doesn't seem to be the case. So how does the coercion actually work? Is there a more basic type I'm missing? "0" is a string containing the