~/talk

JavaScript is an Oddball

Talkat jsday 2025 · 2025-04-07..04-08· [javascript]
slides:none on file

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

  1. 0:00JavaScript oddities
  2. 1:16Unusual syntaxes and APIs
  3. 4:54WTF factor metric
  4. 6:26Non-mutating arrays
  5. 9:41Null vs undefined
  6. 12:34Short-circuiting and booleans
  7. 13:39Static blocks
  8. 16:05JSON and BigInt
  9. 21:56JSON precision loss
  10. 23:45Switch true pattern
  11. 26:18TreeWalker and NodeIterator
  12. 29:53Legacy DOM insertion
  13. 32:22innerHTML vs insertAdjacentHTML
  14. 33:25Closing thoughts
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.