Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
can be an object.. if ypu compare an object with an int the object is coerced and this coercion can be manipulated by you iirc.
-
Yeah somthing like:
var A = function() {
this.i=1;
};
A.prototype.valueOf = function(){
return this.i++;
};
var a = new A();
console.log(a==1);//true
console.log(a==2);//true -
@1989 “JavaScript — Truthy Values Don’t Always Equal True” @BrandonMorelli https://codeburst.io/javascript-tru...
This article clears your doubt on why a = true didnt worked
Related Rants
JavaScript SME's give your answers
rant
interview
javascript