function every(collection, test){
         if(test === undefined){
        for(let i = 0; i < collection.length; i++){
            if(collection[i] === false){
                return false;
            }
        }
    } else if(Array.isArray(collection)){
        for(let i = 0; i < collection.length; i++){
            if(!test(collection[i], i, collection)){
                return false;
            } 
            
        }
    } else {
        for(let key in collection){
            if(!test(collection[key], key, collection)){
                return false;
            }
         
        }
    }
    return true;
     }
/**
     * every: Designed to iterate over a collection and call a test function to every
     * element to check if the values are truthy. As long as the values are truthy the
     * function will keep iterating over the entire collection as long as at each iteration 
     * that value is truthy. At any point of the iteration if any value is falsy the 
     * iteration will be stopped.
     * 
     * @param {Array or Object} collection: The collection to iterate over.
     * @param {Function} test: The function to be called at each iteration to check
     * if the value is truthy or fasly. If no test function is given, the every function
     * will still iterate over the collection to check to see if at each iteration that
     * element's value is truthy or falsy.
     * 
     * @return {Boolean}: If every value passes the test function at each iteration
     * a boolean value of true will be returned, if at least value does not pass
     * a boolean value of false will be returned. 
     */
Designed to iterate over a collection and call a test function to every
element to check if the values are truthy. As long as the values are truthy the
function will keep iterating over the entire collection as long as at each iteration
that value is truthy. At any point of the iteration if any value is falsy the
iteration will be stopped.

@param {Array or Object} collection: The collection to iterate over.
@param {Function} test: The function to be called at each iteration to check
if the value is truthy or fasly. If no test function is given, the every function
will still iterate over the collection to check to see if at each iteration that
element's value is truthy or falsy.

@return {Boolean}: If every value passes the test function at each iteration
a boolean value of true will be returned, if at least value does not pass
a boolean value of false will be returned.
Designed to iterate over a collection and call a test function to every element to check if the values are truthy . As long as the values are truthy the function will keep iterating over the entire collection as long as at each iteration that value is truthy . At any point of the iteration if any value is falsy the iteration will be stopped . @param { Array or Object } collection : The collection to iterate over . @param { Function } test : The function to be called at each iteration to check if the value is truthy or fasly . If no test function is given the every function will still iterate over the collection to check to see if at each iteration that element ' s value is truthy or falsy . @return { Boolean } : If every value passes the test function at each iteration a boolean value of true will be returned if at least value does not pass a boolean value of false will be returned .
function every(collection, test){
         if(test === undefined){
        for(let i = 0; i < collection.length; i++){
            if(collection[i] === false){
                return false;
            }
        }
    } else if(Array.isArray(collection)){
        for(let i = 0; i < collection.length; i++){
            if(!test(collection[i], i, collection)){
                return false;
            } 
        }
    } else {
        for(let key in collection){
            if(!test(collection[key], key, collection)){
                return false;
            }
        }
    }
    return true;
     }
function every ( collection , test ) { if ( test === undefined ) { for ( let i = 0 ; i < collection . length ; i ++ ) { if ( collection [ i ] === false ) { return false ; } } } else if ( Array . isArray ( collection ) ) { for ( let i = 0 ; i < collection . length ; i ++ ) { if ( ! test ( collection [ i ] , i , collection ) ) { return false ; } } } else { for ( let key in collection ) { if ( ! test ( collection [ key ] , key , collection ) ) { return false ; } } } return true ; }
every: Designed to iterate over a collection and call a test function to every
 element to check if the values are truthy.
every : Designed to iterate over a collection and call a test function to every element to check if the values are truthy .