var calculator = { readValues: function() { this.a = "90"; this.b = "30"; }, sum: function() { return this.a + this.b; }, mul: function() { return this.a * this.b; } }; calculator.readValues(); alert( "a" in calculator );