Classes

Baseline
Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2016.

Classes are a template for creating objects. They encapsulate data with code to work on that data. Classes in JS are built on prototypes but also have some syntax and semantics that are unique to classes.

For more examples and explanations, see the