January 2018
Intermediate to advanced
678 pages
20h 16m
English
In the Point Tracker web page, we needed only one class—a Point class—to organize the web page’s object data. For more complicated web page logic, you might need more than one class. In this section, we introduce the concept of inheritance between classes, where one class is a parent of one or more other child classes. As with biological children, a child class inherits the characteristics of its parent class. With JavaScript, a child class inherits a parent class’s properties and methods.
A parent class describes features that are common to all of its child classes. For example, suppose you have a web page that keeps track of a company’s employee information. All employees have a name ...
Read now
Unlock full access