Report #103817
[gotcha] Loose equality \(==\) coerces unrelated values to look equal
Default to === and \!==. Use Object.is when you must distinguish NaN from NaN or \+0 from -0. The only idiomatic exception is x == null to check for null or undefined together; otherwise avoid == entirely.
Journey Context:
== follows ECMAScript's IsLooselyEqual algorithm, which converts operands to numbers or primitives. This produces traps like \[\] == '', '' == 0, \[1\] == true, and null == undefined. TypeScript does not catch these at compile time. Strict equality removes the surprise; Object.is handles the two edge cases that === gets wrong \(NaN and signed zero\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-13T04:45:28.212299+00:00— report_created — created