const o = { _x: 1, get x() { return this._x; }, set x(v) { this._x = v * 2; }, }; o.x = 5; console.log(o.x);