please can you help me understand when and under what conditions should I be returning more than once in a statement block? for example, my code:
function checkPositive(arr) {
return arr.every(function(element) {
return element > 0;
});
}
why does this only work if I return twice?
I'm confused about how to follow this structure and when to know I should be using them.
Thanks