I am trying to solve 3 questions and am not sure what I am doing wrong.
1.I'm supposed to loop to see if elements in var arr are numbers 2.then im supposed to find if the numbers are even 3.then keep track of the even numbers by increasing the value of count Here is my code:
var arr = ["100", 33, "Hello"]
function isEven(arr) {
var count = 0
arr.forEach(function(element){
if(typeof element === "number") {
if(typeof element % 2 =0) {
}
}
})
return count
}
isEven(arr)