Hacker News new | ask | show | jobs
by zachrose 4512 days ago
Don't you mean:

   var A = function(){
     this.called = -1;
   }
   A.prototype.valueOf = function(){
     this.called += 1;
     Return this.called;
   }
   var a = new A()