Reputation
Top tag
Next privilege 200 Rep.
See reduced ads
Badges
3
Newest
 Editor
Impact
0 people reached

  • 0 posts edited
  • 0 helpful flags
  • 7 votes cast
Jan
8
comment Does using == in JavaScript ever make sense?
@back2dos I do agree with you that the behavior of > is consistent with the horrible initial decision. That is why a >== operator would be useful just like === is. Since I'm not using == because it doesn't behave like I want it to, I'd rather not use >= either, to be consistent.
Jan
7
comment Does using == in JavaScript ever make sense?
Consistency throughout the language is not the problem here, remembering the magic rules is. The rules for < are strange, see strilanc.com/visualization/2014/03/27/… Among programming languages, having the + operator work on non-number types is a more common abuse, and a less harmful one IMHO.
Jan
7
comment Does using == in JavaScript ever make sense?
So the poor behavior of == is consistent with the poor behavior of >= ? Great, now I wish there was a >==...