Comparator

typealias Comparator = (a: Any, b: Any) -> Double(source)

A function used to compare two items while sorting a queue.

function compareNumbers(a, b) {
return a - b;
}

Parameters

a

An item in the array.

b

An item in the array.

See also