Type Conversion & Coercion
What does `'' == false` evaluate to in JavaScript?
The expression '' == false evaluates to true in JavaScript. When comparing a string and a boolean with the loose equality operator (==), JavaScript follows a specific conversion algorithm: first, the boolean is converted to a number (false becomes 0, true becomes 1), and then the string is converted to a number (an empty string becomes 0). Since 0 == 0 is true, the result is true. This is an example of why the loose equality operator can lead to confusing results and why many developers prefer the strict equality operator (===), which would return false for '' === false because the types are different.