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
-
@ruant 🤣
At least, I'm hoping it's you that mentioned JS in Slack the other day. Otherwise this is a wrong tag 😔 -
hell165967yEvery time you compare it, it calls `toString` and increments `value`
Makes perfect sense... -
i dont see why you would hate on the fact that the code you wrote is straight up dumb. languages like ruby, elixir, and pretty much every other language has some type of method override for objects, so you couldve done this in basically any other language.
Related Rants
var a = {
value: -1,
toString: function() {
return ++this.value;
}
}
if(a & !a) {
console.log("F**k you JS!");
}
if(a == 2 && a == 3) {
console.log("F**k you again JS!");
}
rant
js
inconsistency
madness
hate it
javascript