In JavaScript, classes are types of functions / templates for creating objects.
They are defined with the class
keyword and they can be used to support some of the Object-Oriented principles (note that JS is not a OOP language by default, differently from Java).
Object-oriented programming (OOP) is a computer programming model that organizes software design around data, or objects, rather than functions and logic. An object can be defined as a data field that has unique attributes and behavior.
OOP focuses on the objects that developers want to manipulate rather than the logic required to manipulate them. This approach to programming is well-suited for programs that are large, complex and actively updated or maintained.