-Infinity is less than all numbers, -NaN is greater than -Infinity but less than all other numbers, NaN is greater than -NaN but less than all other numbers and Infinity is greater than all numbers. -NaN and NaN are equal to themselves.
the decimal or built-in number to compare to
Barring special values, 0 if subtracting the two numbers yields 0, -1 if the result is less than 0, and 1 if the result is greater than zero
See Implementation
-Infinity is less than all numbers, -NaN is greater than -Infinity but less than all other numbers, NaN is greater than -NaN but less than all other numbers and Infinity is greater than all numbers. -NaN and NaN are equal to themselves.