Today I learn that it's possible to write properties in JS: var i = 0; var o = { get x() { return i++; }; o.x; o.x;