michael@0: michael@0: called = 0; michael@0: function foo() { michael@0: this.what(); michael@0: this.random = 0; michael@0: this.what = 1; michael@0: } michael@0: foo.prototype.what = function() { called = 1; } michael@0: new foo(); michael@0: assertEq(called, 1);