Function that determines the order of two values.
A comparator returns one of the following:
a
b
Typical usages for a comparator include:
There are some comparator functions built-in with JavaScript. For example:
Function that determines the order of two values.
A comparator returns one of the following:
ais less thanbais greater thanbTypical usages for a comparator include:
There are some comparator functions built-in with JavaScript. For example: