JavaScript Puzzlers
summary
Five short JavaScript puzzles show concrete surprises and fixes: modulus keeps the left-hand sign so -9 % 2 === -1 (fix: check !== 0 or use bitmask), function-level hoisting and lack of block scope break loop variables (fix: declare/assign at top or use let), hitting 2^53 precision limit makes a for loop never advance, IEEE‑754 floating points make 0.6/0.8 math produce 0.207 (fix: use cents for money), and the binary + has higher precedence than ?: so string concatenation yields "hello true" unless parenthesized (order of operations).
AI-written summary · about
chapters (6)
- 0:00Introduction to puzzlers
- 3:04Puzzler one: That's odd
- 10:24Puzzler two: The one
- 18:05Puzzler three: Loop-de-loop
- 25:12Puzzler four: Why are we bankrupt
- 29:26Puzzler five: The prestige








