JavaScript is an Oddball
summary
Shows concrete tricks and limits: use Intl.Collator (or localeCompare with options) to sort mixed strings in one line and precreate a Collator for large lists because it’s faster but only optimized ascending; use a static initialization block to attach helpers that can read private fields without exposing them; prefer structuralClone to JSON for preserving undefined and symbols (but note structuralClone is consistently slower than JSON.parse/JSON.stringify); polyfill BigInt JSON serialization; use TreeWalker/NodeIterator and insertAdjacent* APIs when you need fine DOM control.
AI-written summary · about
chapters (14)
- 0:00JavaScript oddities
- 1:16Unusual syntaxes and APIs
- 4:54WTF factor metric
- 6:26Non-mutating arrays
- 9:41Null vs undefined
- 12:34Short-circuiting and booleans
- 13:39Static blocks
- 16:05JSON and BigInt
- 21:56JSON precision loss
- 23:45Switch true pattern
- 26:18TreeWalker and NodeIterator
- 29:53Legacy DOM insertion
- 32:22innerHTML vs insertAdjacentHTML
- 33:25Closing thoughts








