After reviewing whether a number is prime using the Or Boolean statement, the results are unexpected. Instead of completing the check and returning only prime numbers, the function returns the entire array.
function sumPrimes(num) {
var arr = [];
var prime;
for(var i = 1; i <=num; i++){
if(i%2 !== 0 || i%3 !== 0 || i%5 !== 0){
arr.push(i);
}
}
return arr;
}
sumPrimes(10);