Every check challenge

Tell us what’s happening:
Describe your issue in detail here.

‘’’
function checkPositive(arr) {

// Only change code below this line

arr.every(function(value){

return value > 0;

});

// Only change code above this line

}

checkPositive([1, 2, 3, -4, 5]);

‘’’

   **Your code so far**

function checkPositive(arr) {
 // Only change code below this line
arr.every(function(value){
return value > 0;
});

 // Only change code above this line
}
checkPositive([1, 2, 3, -4, 5]);

hey everyone. here is my code that returns true if it checks that every value in the array is positve. i thought i did everything right but cant get my code to pass. I double checked for typos and everything.

   **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36

Challenge: Use the every Method to Check that Every Element in an Array Meets a Criteria

Link to the challenge:

You aren’t returning the result of every()

oh i see so i need another return value

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.