defaultSubComparer
The default comparer to determine whether one object is greater, less than or equal to another.
Arguments
x
(Any): The first value to comparey
(Any): The second value to compare
Returns
(Number): Returns 1
if x
is greater than y
, -1
if y
is greater than x
, and 0
if the objects are equal.
Example
Last updated
Was this helpful?