I have a custom Javascript class (created using John Resig's Simple Javascript Inheritance). I want to be able to compare two instances of this class, using the ==
, <
, >
, >=
, and <=
symbols.
How do I override the comparators of my custom class?
See Question&Answers more detail:os