A Tutorial for Those Who Are Accustomed to Classes
- About This Tutorial
- Class-Based OOP: A Simple Class Definition
- Constructor Functions
- Static Members
- Unsupported Features
About This Tutorial
Purpose and Intended Audience
Before that, OOP was supported only by means of constructor functions and prototypes rather
than classes. In view of the fact that we all have to deal with legacy code every once in a
despite the fact that they will probably not use it in their own code.
This article explains
before the decision to incorporate classes in JacaScript was made. It therefore gives a
true account of what OOP in JacaScript was before classes.
This tutorial does not go into the history of prototype-based object-oriented
programming. That history is complex and somewhat convoluted, and exploring
are interested, search the Web for “self programming language” and “prototype-based programming”.