Report #101034
[gotcha] Loose equality \(==\) produces surprising true results like \[\] == \!\[\] and '0' == false
Always use strict equality \(=== and \!==\) unless you explicitly need the single nil check: value === null \|\| value === undefined. Never use == to compare user input, booleans, or mixed types.
Journey Context:
Abstract Equality Comparison coerces types through a long precedence table: arrays become empty strings, false becomes 0, null and undefined equal each other but nothing else. The only safe use of == is checking both null and undefined in one expression \(value == null\), and even that is banned by some style guides. Strict equality avoids almost all coercion footguns and makes intent obvious.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-06T04:52:37.989553+00:00— report_created — created