What does the [1] iterator evaluate for the underscore sortBy function?

I have the following line of code:

dataArray = _.sortBy(dataArray, [1]).reverse();

What would be evaluated as the answer?

It means your dataArray is used to give a sorted array based on the comparison of the "1" property of each element of the original array.

For example if it is an array of strings, the second char is used as the comparator. If it is an array of arrays, the second element of each array is used.

Its a shortcut for defining an iterator function which extract the given property of each item.

Then reverse does what it has always done, reversing the array.

The extra brackets ([]) aren't actually necessary, but _.sortBy(dataArray, 1) is short-hand for a lookup iterator:

_.sortBy(dataArray, function (data) { return data[1]; });

This can be used to sort an Array of Arrays by the 2nd item in each inner-Array:

var origin = [ [0, 5], [1, 4], [2, 3] ];

// sort by `5`, `4`, and `3`
var sorted = _.sortBy(origin, 1);

console.log(sorted); // [ [2, 3], [1, 4], [0, 5] ];