Check the array below to see if any of the words in it are less than 8 characters:
var array1 =["beautiful", "longing", "trepidation", "anxiety", "happiness", "excitement"];
I almost feel as though I wrote a poem there. LOL.
The output should equal true if all words are 8 characters or more, and false any word is less than 8 characters.
Solution in the comments.
var example = _.every(array1, function(item){
ReplyDeletereturn item.length >= 8;
});