build/rekord.js
function(properties, startingValue, compareFunction)
  {
    var comparator = compareFunction || compare;
    var resolver = createPropertyResolver( properties );
    var max = startingValue;

    for (var i = 0; i < this.length; i++)
    {
      var resolved = resolver( this[ i ] );

      if ( comparator( max, resolved, true ) < 0 )
      {
        max = resolved;
      }
    }

    return max;
  }
function(properties, startingValue, compareFunction)
  {
    var comparator = compareFunction || compare;
    var resolver = createPropertyResolver( properties );
    var max = startingValue;

    for (var i = 0; i < this.length; i++)
    {
      var resolved = resolver( this[ i ] );

      if ( comparator( max, resolved, true ) < 0 )
      {
        max = resolved;
      }
    }

    return max;
  }
function ( properties , startingValue , compareFunction ) { var comparator = compareFunction || compare ; var resolver = createPropertyResolver ( properties ) ; var max = startingValue ; for ( var i = 0 ; i < this . length ; i ++ ) { var resolved = resolver ( this [ i ] ) ; if ( comparator ( max , resolved , true ) < 0 ) { max = resolved ; } } return max ; }
Returns the maximum value for the given property expression out of all the
elements this collection.

```javascript
var c = Rekord.collect({age: 6}, {age: 5}, {notage: 5});
c.max('age');  // 6
```

@method
@memberof Rekord.Collection#
@param {propertyResolverInput} [properties] -
The expression which takes an element in this container and resolves a
value that can be compared to the current maximum.
@param {Any} [startingValue] -
The initial maximum value. If a value is specified, it's compared
against all elements in this collection until the comparator function
finds a more maximal value. If it doesn't - this is the value returned.
@param {compareCallback} [compareFunction=Rekord.compare] -
A comparison function to use.
@return {Any} -
The maximum value found.
@see Rekord.createPropertyResolver
@see Rekord.compare
Returns the maximum value for the given property expression out of all the elements this collection .