Q:

What does this code do(Sorting Multiple Arrays)?

I was searching for "how to sort multiple arrays at once" and found this question here: Sorting multiple arrays at onceAnd there a nice answer from Alexander solving my problem. But I don't fully understand this part from the answer right there: 
/* A shorthand function */
var comparator = function(arr) {
    return function(a, b) {
        return ((arr[a] < arr[b]) ? -1 : ((arr[a] > arr[b]) ? 1 : 0));
    };
};

Could someone explain me what this part of his code does?

A:

This function will compare the values of 2 indexes of an array.  The return uses a syntax called Conditional Operator.  Here is a nice link that explains it. 
Question Mark in JavaScript

