Class

  • In object-oriented programming, a class is an extensible program-code-template for creating objects, providing initial values for state (member variables) and implementations of behavior (member functions or methods).
  • Construct allows to define prototype-based classes with a clean, nice-looking syntax.
  • May also include getters/setters.

Syntax

class MyClass {
  constructor(...) {
    // ...
  }
  method1(...) {}
  method2(...) {}
  get something(...) {}
  set something(...) {}
  static staticMethod(..) {}
  // ...
}

Class — Structure map

Clickable & Draggable!

Class — Related pages: