JavaScript
Functions in objects

by Florian Keller

var functions = {
  doThis: function() {
    // ...
  },
  doThat: function() {
    // ...
  }
};

const functions = {
  doThis() {
    // ...
  },
  doThat() {
    // ...
  }
}

green corner: ES2015 classes

Johannes Hund

god please no classes...

Aleksandr Strutynskyy

Some browsers lack es5 support. Vote wisely.

Foxatron

Sign in to comment!