Search⌘ K
AI Features

Creating Abstract Classes

Explore how to create abstract classes in ES6 JavaScript to prevent instantiation of base classes and organize shared functionality. Understand the use of inheritance and the new.target property to build cleaner, more maintainable code with practical examples from real-world scenarios like chart views and shapes.

We'll cover the following...

Abstract classes are classes that cannot be instantiated. For instance, if we have the Shape class, we cannot do much with a generic shape until we know what kind of shape we are ...