function map(collection, action){
         let result = [];
   each(collection, (e, i, a) =>{
       if(Array.isArray(collection)){
       result.push(action(e, i, a));
       } else {
           result.push(action(e, i, a));
       }
   });
   return result;
   }
/**
   * map: Designed to iterate over a collection and preform a test function on each
   * element inside of the collection. At the end of the iteration, a new array is made
   * with the values that the test function evaluates to.
   * 
   * @param {Array or Object} collection: The collection to iterate over.
   * @param {Function} action: The function to be ran at each iteration through the 
   * collection.
   * 
   * @return {Array}: A new array containing all of the transformed values that
   * resulted from the specified call back test function.
   */
Designed to iterate over a collection and preform a test function on each
element inside of the collection. At the end of the iteration, a new array is made
with the values that the test function evaluates to.

@param {Array or Object} collection: The collection to iterate over.
@param {Function} action: The function to be ran at each iteration through the
collection.

@return {Array}: A new array containing all of the transformed values that
resulted from the specified call back test function.
Designed to iterate over a collection and preform a test function on each element inside of the collection . At the end of the iteration a new array is made with the values that the test function evaluates to . @param { Array or Object } collection : The collection to iterate over . @param { Function } action : The function to be ran at each iteration through the collection . @return { Array } : A new array containing all of the transformed values that resulted from the specified call back test function .
function map(collection, action){
         let result = [];
   each(collection, (e, i, a) =>{
       if(Array.isArray(collection)){
       result.push(action(e, i, a));
       } else {
           result.push(action(e, i, a));
       }
   });
   return result;
   }
function map ( collection , action ) { let result = [ ] ; each ( collection , ( e , i , a ) => { if ( Array . isArray ( collection ) ) { result . push ( action ( e , i , a ) ) ; } else { result . push ( action ( e , i , a ) ) ; } } ) ; return result ; }
map: Designed to iterate over a collection and preform a test function on each
 element inside of the collection.
map : Designed to iterate over a collection and preform a test function on each element inside of the collection .