var nums = [1, 2, 3, 4, 5, 6, 7]; function even(ele) { return ele%2 == 0; } console.log(nums.every(even)) /*console.log will show false since not every element is even*/