While Javascript is a prototype-based language, you can still use classes.
Classes can be defined using class expressions or class declarations.
// Declaration
class MyClass {}
// Expression
const MyClass = class {}
Classes use a constructor method to instantiate the class.
Class fields are defined the same as object properties.
Private class features are prefixed with #.
Static properties (class fields and methods) provide the same function or value across instances of a class.
Level
Topics
Resources
Questions