compare MethodStatic

sort-compatible comparison.

  • Returns (a-b) which is
    • negative if a<b
    • zero if a === b (with exact equality)
    • positive if a>b

compare(a: any, b: any): number

Parameter Type Description
a any  
b any  

Returns - number

Defined in

Last Updated: 15 March, 2024