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: 28 October, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.