Glossary: Data Structures and Algorithms in JavaScript
Comparator
Also written: compare function, comparison function
A function given to sort that receives two items and returns a negative number, 0 or a positive number to say which goes first. It must return a number, not true or false.