Objects and Classes in JavaScript: Prototypes and Composition

JavaScript objects work differently from classical languages. A look at prototypes, the class syntax built on top of them, and when composition beats inheritance.