September 2024
Beginner to intermediate
985 pages
35h 37m
English
JavaScript is a prototype-based language, so it doesn't know any classes—at least, not real ones. Instead, everything in JavaScript is based on objects. In this section, we’ll show you how the classical object orientation based on objects or prototypes (prototypical object orientation) works.
Every object in JavaScript is based on a prototype. At least, almost every object, because some objects—for example, the mother of all objects, Object, or objects whose prototype has been explicitly set to null—have no prototype.
Each object can also serve as a template—that is, as a prototype for another object. In this case, the new object inherits the properties and methods from ...
Read now
Unlock full access