JavaScript’s “+” Operator and Decision Fatigue
summary
Claim: the JavaScript + operator produces unintuitive results because ECMAScript runs a long coercion procedure so 2 + "2" => "22" and Infinity + -Infinity => NaN via ToPrimitive/ToNumber rules; about ten to twenty internal steps determine behavior. Performance and reasoning tradeoffs are handled by v8's turbofan JIT, which inlines hot paths. Cognitive parallel: ego‑depletion experiments (cookie vs radish) and a judicial study (parole rates fall from ~65% to 0 before breaks) justify tactics: do hardest work first, schedule commitments, simplify decisions.
AI-written summary · about
chapters (13)
- 0:00Plus operator introduction
- 1:43How plus operator works
- 3:10Plus operator examples
- 5:24Plus operator edge cases
- 7:25Why improvements matter
- 8:49V8 TurboFan speed
- 10:36Decision fatigue basics
- 12:25Willpower depletion study
- 14:34Decision fatigue in professional settings
- 15:40Judges' parole decisions
- 16:44Preventing decision fatigue
- 18:32Done > perfect
- 19:35Community progress








