JavaScript Type Coercion and Equality: Why `[] == ![]` is `true`

JavaScript coercion isn’t chaos — it’s a small set of rules. To-number/to-string/to-boolean tables, `==` vs `===`, why `[] == ![]` is `true` (walked step by step), the 7 falsy values, when `== null` is the right tool, and `Object.is`.

JavaScript Type Coercion and Equality: Why `[] == ![]` is `true` Read More »