JavaScript: The Bad Parts
summary
Concrete gotchas with code examples and terminal experiments: how + coerces numbers to strings so swap operands can change results (including an empty block plus unary + edge case), why comparing numeric strings fails unless you cast, the assignment-as-expression pitfall and a linter rule to ban it, floating‑point comparisons requiring an epsilon, Array.prototype.sort needing a numeric compare function, and how Number.isNaN differs from global isNaN so NaN is reliably detected.
AI-written summary · about








