Compares numbers by numeric value, otherwise uses the default logic of string comparison.
Is an ascending sort: b, a, c -> a, b, c 10, 5, 100 -> 5, 10, 100
Returns -1 if x is less than y Returns 1 if x is greater than y Returns 0 if x is the same as y
comparerInverse Inverted order
Compares numbers by numeric value, otherwise uses the default logic of string comparison.
Is an ascending sort: b, a, c -> a, b, c 10, 5, 100 -> 5, 10, 100
Returns -1 if x is less than y Returns 1 if x is greater than y Returns 0 if x is the same as y