binarySearchComparator
A function used to compare two items while performing a binary search.
function compareNumbers(a, b) {
return a - b;
}
Content copied to clipboard
Parameters
a
An item in the array.
b
The item being searched for.