function aggregate(accum, stat) {
    if (stat.stat_type !== types.RUSH) {
      return accum;
    }

    var player = stat.player.name;
    var yards = stat.yards;

    if (!accum[player]) {
      accum[player] = yards;
    } else {
      accum[player] += yards;
    }

    return accum;
  }
/**
   * If the stat is a rush, the player's total yardage is incremented
   * by the yardage of the play. Otherwise, the stat is skipped over
   * @param  {object} accum - The initial value from collect's reduce
   * @param  {object} stat  - A given stat object from the statistics array
   * @return {object}         The accumulator with players names and their total yardage         
   */
If the stat is a rush, the player's total yardage is incremented
by the yardage of the play. Otherwise, the stat is skipped over
@param  {object} accum - The initial value from collect's reduce
@param  {object} stat  - A given stat object from the statistics array
@return {object}         The accumulator with players names and their total yardage
If the stat is a rush the player ' s total yardage is incremented by the yardage of the play . Otherwise the stat is skipped over @param { object } accum - The initial value from collect ' s reduce @param { object } stat - A given stat object from the statistics array @return { object } The accumulator with players names and their total yardage
function aggregate(accum, stat) {
    if (stat.stat_type !== types.RUSH) {
      return accum;
    }
    var player = stat.player.name;
    var yards = stat.yards;
    if (!accum[player]) {
      accum[player] = yards;
    } else {
      accum[player] += yards;
    }
    return accum;
  }
function aggregate ( accum , stat ) { if ( stat . stat_type !== types . RUSH ) { return accum ; } var player = stat . player . name ; var yards = stat . yards ; if ( ! accum [ player ] ) { accum [ player ] = yards ; } else { accum [ player ] += yards ; } return accum ; }
If the stat is a rush, the player's total yardage is incremented
 by the yardage of the play.
If the stat is a rush the player ' s total yardage is incremented by the yardage of the play .