Classes

Classes are the primary construct which we organize our code in Object-Oriented Programming (OOP) languages. In this chapter, we will overview how classes work in JavaScript.

JavaScript introduced the class keyword in 2015 with the release of ES6. Class syntax unifies constructor function and prototype methods.

We will focus on modern JavaScript and ignore its traditional ways of mimicking OOP. An interested reader may refer to the following resources for more information: