function max(array, callback, thisArg) {
    var computed = -Infinity,
        result = computed;

    if (!array) {
      return result;
    }
    var current,
        index = -1,
        length = array.length;

    if (!callback) {
      while (++index < length) {
        if (array[index] > result) {
          result = array[index];
        }
      }
      return result;
    }
    if (thisArg) {
      callback = iteratorBind(callback, thisArg);
    }
    while (++index < length) {
      current = callback(array[index], index, array);
      if (current > computed) {
        computed = current;
        result = array[index];
      }
    }
    return result;
  }
Retrieves the maximum value of an `array`. If `callback` is passed,
it will be executed for each value in the `array` to generate the
criterion by which the value is ranked. The `callback` is bound to
`thisArg` and invoked with 3 arguments; (value, index, array).

@static
@memberOf _
@category Arrays
@param {Array} array The array to iterate over.
@param {Function} [callback] The function called per iteration.
@param {Mixed} [thisArg] The `this` binding for the callback.
@returns {Mixed} Returns the maximum value.
@example

var stooges = [
  { 'name': 'moe', 'age': 40 },
  { 'name': 'larry', 'age': 50 },
  { 'name': 'curly', 'age': 60 }
];

_.max(stooges, function(stooge) { return stooge.age; });
// => { 'name': 'curly', 'age': 60 };