index.js
/**
 * filter: The anonymous function calls upon the element, index, and array. The callback function
 *      will test the element for true values. If this condition is met, the element will get pushed into a new array.
 *              
 * 
 * @param {Array} array: any array 
 * @param {function} callback: a function that tests truthy of a value
 * 
 * @return {array}: a new array with the true elements in 
 */
The anonymous function calls upon the element, index, and array. The callback function
will test the element for true values. If this condition is met, the element will get pushed into a new array.

@param {Array} array: any array
@param {function} callback: a function that tests truthy of a value

@return {array}: a new array with the true elements in
The anonymous function calls upon the element index and array . The callback function will test the element for true values . If this condition is met the element will get pushed into a new array . @param { Array } array : any array @param { function } callback : a function that tests truthy of a value @return { array } : a new array with the true elements in
function filter(array, callback){
  const filterArr = [];
  each(array, function(element, index, array){
      if(callback(element, index, array)){
          filterArr.push(element);
      }
  })
   return filterArr;
}
function filter ( array , callback ) { const filterArr = [ ] ; each ( array , function ( element , index , array ) { if ( callback ( element , index , array ) ) { filterArr . push ( element ) ; } } ) return filterArr ; }
filter: The anonymous function calls upon the element, index, and array.
filter : The anonymous function calls upon the element index and array .