ES6 Classes

class Foo {
  constructor() { ... }
  method() { ... }
}

Old

var Foo = function () { // constructor };
Foo.prototype.method = function () { ... };

Back to presentation