Patterns for Programming in JavaScript
summary
Shows concrete patterns and gotchas: enable use strict to avoid accidental globals, prefer === over ==, and use closures to encapsulate private state rather than exposing variables. Demonstrates putting shared methods on prototypes and using Object.create to set up inheritance safely, a small createClass factory to avoid repeated boilerplate, replacing nested callbacks with named functions for testability, using predicates as a lightweight strategy, and building fluent APIs by returning this. Warns that clutchy Singleton hacks are brittle and a plain module object often suffices.
AI-written summary · about
chapters (18)
- 0:00Intro
- 2:38Use Strict
- 7:38Scope
- 9:09Anonymous Closure
- 12:25Creating Classes
- 24:40Inheritance
- 29:39Refactoring
- 38:12Clever Code
- 39:32Crude Code
- 40:40JSON Object
- 42:22Total Values
- 43:42Total Even Values
- 44:42Copy and Paste
- 46:12Guilt
- 49:12Fluency
- 50:42mailer
- 51:42Cascade
- 52:12Train Wreck








