top | item 7176033 (no title) eggsby | 12 years ago Nice read, I had to think about a few of these.In particular (a == 0) && (a == 1) && (a == 2).Here's a fun value for a: var a = { called: -1, valueOf: function() { this.called += 1; return this.called; } }; discuss order hn newest zachrose|12 years 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() cturhan|12 years ago I must think out of the box. I'm trying to find a number/string to make true. Nice catch.
zachrose|12 years 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()
cturhan|12 years ago I must think out of the box. I'm trying to find a number/string to make true. Nice catch.
zachrose|12 years ago
cturhan|12 years ago