ECMAScript Regrets
summary
Catalogs specific JavaScript pitfalls, gives concrete fixes and linters and shows which issues are unfixable in practice. Calls out Number.isNaN as the correct ES6 fix for NaN versus the broken isNaN, explains why typeof null === "object" (C implementation tag) and why that can’t be changed, points to an eslint rule to ban shadowing globals like undefined, warns about stateful regexps with /g, recommends using ES6 arrow functions or a captured this pattern and notes DOM convenience node.remove and XHR/localStorage quirks.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 0:40Origin of web regrets
- 2:08Why the web cannot be fixed
- 3:10Documenting javascript regrets
- 4:32Example: NaN and isNaN
- 7:15Example: Typeof null
- 9:02Example: Reserved keywords
- 10:12Example: This context
- 12:06Example: Stateful regexps
- 13:06Example: Operator precedence
- 14:06Conclusion and recommendations
- 15:04Avoiding future regrets
- 16:19Regrets in CSS and DOM








