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:
a
is less thanb
a
is greater thanb
Typical usages for a comparator include:
There are some comparator functions built-in with JavaScript. For example: