Having trouble removing all the even numbers from this array. Can't seem to get them all out of there, not sure why.
var numArr = [3,45,56,7,88,56,34,345];
for (var i = 0; i < numArr.length; i++) {
if (numArr[i] % 2 === 0) {
numArr.splice(i,1);
}
}
console.log(numArr);
is returning [3, 45, 7, 56, 345] instead of just [3, 45, 7, 345].
Any suggestions?