JavaScript is weird. MythBusters special
summary
Live demos run in a small demo web app that shows code, output and audience voting and mostly works despite some zoom problems. Examples show concrete quirks: 1 + 2 === '12', 2 - 1 === 1, true + true === 2; NaN !== NaN while typeof NaN === 'number'; null + 5 === 5 but undefined + 5 === NaN; 0.1 + 0.2 !== 0.3; automatic semicolon insertion makes return { } become undefined; shallow copy yields shared object mutation; function.length counts params before the first default.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 3:19JavaScript myths spread online
- 5:51Demo setup and rules
- 7:21Type coercion in arithmetic
- 10:21NaN behavior and IEEE 754
- 13:30Loose vs strict equality
- 15:39Shallow cloning and references
- 17:28Null versus undefined
- 20:46Semicolon insertion quirks
- 22:55Function length and parameters
- 25:00Floating point precision
- 27:10String concatenation and NaN parsing
- 28:40Shadowing undefined parameter
- 30:05Historical reasons for quirks
- 31:30Summary and Q&A
related talks
41mJavaScript is Weird. MythBusters Special
44mJavaScript is weird. MythBusters special.
18mWTFJS
24mDown the Rabbit Hole: Javascript in Wonderland
11mUnderstanding the differences is accepting
05mJavaScript: The Bad Parts
55mJavaScript the Grumpy Parts
23mTruthiness, falsiness and other JavaScript gotchas
