If I have an if statement that needs to meet these requirements:
if(cave > 0 && training > 0 && mobility > 0 && sleep > 0)
>
Why you are looking for solution?
Your question looks like best and simple answer, i recommend it. We have multiple solutions for this. Below one is that.
JSBin for .every()
Achieve it by using .every function
var flag = [cave, training, mobility, sleep].every(function(val) {
return val > 0;
});
if(flag) {
alert('All the elements are greater than Zero');
}