var p = {x: 1, // value propertyy: 1, // value propertydiag: function() { return this.x - this.y; }, // value propertyget area() { return this.x * this.y; }, // property getterset area(a) { this.x = Math.sqrt(a); this.y = Math.sqrt(a); } // property setter}
