~/talk

Truthiness, falsiness and other JavaScript gotchas

Talkat Web Directions Code 2012 · 2012-05-22..05-23· [javascript]
links:none on file
slides:none on file

Covers concrete JS pitfalls: loose typing and type coercion cause == vs === surprises (1 + "2" + 3 → "123" or 1 + 2 + "3" → "33"), about 30% of bugs trace to coercion, the arguments object is not an Array so common for-loops return wrong values, parseInt without a radix treats leading zeros as octal, Math.max/min seed with ±Infinity, Number.MIN_VALUE is the smallest positive number, and floating-point math (0.1 + 0.2 !== 0.3) demands tolerant comparisons or integer math.

AI-written summary · about

  1. 0:00Start
  2. 6:21The "are you sure" operator
  3. 9:11Type coercion III
  4. 11:19Good Twin
  5. 12:45arguments
~/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.