index.js
/**
*every: takes an collection and function and it will check if every element in that collection is true
* If there is no callback function given, it will return true for truthy results.
*If there is no callback function given, it will return false for falsy results.
* @param: {collection} collection: Can be any collection
* @param: {function} fun: this function will be called upon by the collection's element
* @return: {Boolean}: If ALL the values are true, it will return a true boolean value. Else, it will return false.
*/
takes an collection and function and it will check if every element in that collection is true
If there is no callback function given, it will return true for truthy results.
If there is no callback function given, it will return false for falsy results.
takes an collection and function and it will check if every element in that collection is true If there is no callback function given it will return true for truthy results . If there is no callback function given it will return false for falsy results .
function every(collection, fun){
 if (typeof(fun) !== 'function') {
      return !contains(collection, false);
   }
    var newArray = [];
    newArray = map(collection, fun);
    console.log(newArray);
    return !contains(newArray, false);
}
function every ( collection , fun ) { if ( typeof ( fun ) !== 'function' ) { return ! contains ( collection , false ) ; } var newArray = [ ] ; newArray = map ( collection , fun ) ; console . log ( newArray ) ; return ! contains ( newArray , false ) ; }
every: takes an collection and function and it will check if every element in that collection is true
If there is no callback function given, it will return true for truthy results.
every : takes an collection and function and it will check if every element in that collection is true If there is no callback function given it will return true for truthy results .