INF310: Modern JS, Fall 2017 > Language Features > Classes
Classes
Declaration
Class statement
  class Point {
    constructor(x, y) {
      this.x = x;
      this.y = y;
    }

    getCoordinates() {
      return {
        x: this.x,
        y: this.y
      };
    }
  }

  const center = new Point(0, 0);
Class expression
  const Point = class { getX() {}, getY() {} };
Inheritance

See Prototypes

Extends
Super
Static