JavaScript Patterns and Techniques discusses JavaScript fundamentals including:
- JavaScript is an implementation of EcmaScript with support varying by browser version. It is prototype-based, dynamically typed, supports first class functions, and can be used in object-oriented, functional, or imperative styles.
- Objects can be created using literals, anonymous constructors, factory methods, or wrappers. Properties can be set using dot notation, square brackets, or Object helper methods.
- Constructors, or classes, are defined using functions but must be invoked with new. Constructors set the prototype and allow for polymorphism.
- Variables scope differs in JavaScript. Private class members can be achieved through closures or