function reduce(array, action, seed){
          for(let i = 0; i < array.length; i++){
        if(seed === undefined){
            seed = array[0];
        } else {
            seed = action(seed, array[i], i);
        }
    }
    return seed;
      }
/**
      * reduce: Designed to iterate over a collection and transform that collection
      * into a single value. Reduce does this by accumulating the results at each
      * iteration up until the end of the collection and return whatever that last
      * accumulated value is. At each iteration the callback function will be ran on
      * each element. 
      * 
      * @param {Array} array: A collection to iterate over.
      * @param {Function} action: A function to run on each iteration over the collection
      * to each element. 
      * @param {Value} seed: An initial value to start accumulating each value 
      * in the collection. If no seed is given, the first index of the collection will
      * take the place of the seed (inital starting value).
      * 
      * @return {Value} seed: returns the value of seed at the end of the iteration.
      */
Designed to iterate over a collection and transform that collection
into a single value. Reduce does this by accumulating the results at each
iteration up until the end of the collection and return whatever that last
accumulated value is. At each iteration the callback function will be ran on
each element.

@param {Array} array: A collection to iterate over.
@param {Function} action: A function to run on each iteration over the collection
to each element.
@param {Value} seed: An initial value to start accumulating each value
in the collection. If no seed is given, the first index of the collection will
take the place of the seed (inital starting value).

@return {Value} seed: returns the value of seed at the end of the iteration.
Designed to iterate over a collection and transform that collection into a single value . Reduce does this by accumulating the results at each iteration up until the end of the collection and return whatever that last accumulated value is . At each iteration the callback function will be ran on each element . @param { Array } array : A collection to iterate over . @param { Function } action : A function to run on each iteration over the collection to each element . @param { Value } seed : An initial value to start accumulating each value in the collection . If no seed is given the first index of the collection will take the place of the seed ( inital starting value ) . @return { Value } seed : returns the value of seed at the end of the iteration .
function reduce(array, action, seed){
          for(let i = 0; i < array.length; i++){
        if(seed === undefined){
            seed = array[0];
        } else {
            seed = action(seed, array[i], i);
        }
    }
    return seed;
      }
function reduce ( array , action , seed ) { for ( let i = 0 ; i < array . length ; i ++ ) { if ( seed === undefined ) { seed = array [ 0 ] ; } else { seed = action ( seed , array [ i ] , i ) ; } } return seed ; }
reduce: Designed to iterate over a collection and transform that collection
 into a single value.
reduce : Designed to iterate over a collection and transform that collection into a single value .