Tell us what’s happening:
Your code so far
function checkPositive(arr) {
// Add your code below this line
return arr.every(item => {
return (item > -1) ? true : false;
});
// Add your code above this line
}
checkPositive([1, 2, 3, -4, 5]);
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/functional-programming/use-the-every-method-to-check-that-every-element-in-an-array-meets-a-criteria