Inheritance and Subclasses (JavaScript)
OOPA-levelLesson packSubscription
About this resource
Understand how one class can inherit from another in JavaScript using extends, how to use super() in the constructor, and how to check types at runtime.
11 slides.
Lesson outline
- Is-A or Has-A?
- The Is-A Relationship
- Writing a Subclass in JavaScript
- Dog Inherits From Animal: Live Demo
- UML: Inheritance Arrow
- `instanceof` — Type Checking in JavaScript
- Python vs JavaScript: Inheritance Syntax
- Coding Practice: Animal Hierarchy
- Lesson Summary
Unit bundleUnit 3A · Inheritance and Subclasses


