Limited classes can also be defined via functions with the prototype attribute set, but doing so is discouraged for new code.
Every class is also a value and has type Type .
Class Declarations A class definition not followed by a Block is called a class declaration. A class declaration indicates that the class will be defined later in the same scope. When a class declaration is executed, it defines its Identifier as a new class. That Identifier may be used in subsequent type expressions, but instances of the class may not be created until the class's definition is fully executed. If a variable is defined with the class as its type before the class is defined, then that variable gets the value null .