first value to compare
second value to compare
A number indicating the relationship between the two numbers:
-1
if a
is less than b
1
if a
is greater than b
0
if a
is equal to b
const arr = [3n, true, -2n, false]
arr.sort(compareNumeric) // [-2n, false, true, 3n]
Generated using TypeDoc
number, bigint, boolean comparator function (ascending)