Function that compares two items for sorting (ascending).
compare("a", "b") // -1compare("a", "a") // 0compare(1, 2) // -1[3, 2, 4, 1].sort(compare) // [1, 2, 3, 4]
Generated using TypeDoc
Function that compares two items for sorting (ascending).
Example