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
- negative if
compare(a: any, b: any): number
Parameter | Type | Description |
---|---|---|
a | any | |
b | any |
Returns - number
Defined in
Last Updated: 20 June, 2023