I have this example code:
var foo = { self: this, init: function(){ self.doStuff(); }, doStuff: function(){ alert(\'doing
ES6 provides getters for the object properties, so you can use them to reference the object itself and to use its other members:
var foo = { prop1: 1, get prop2() { return this.prop1 + 1; } } // foo.prop2 = 2;