I am trying to remove all the even numbered items from my array with this code:
var myArray = [1,2,3,4,5,6];
myArray.forEach(function(item) {
if (item%2 == 0) {
myArray.splice(item);
}
});
I think where im getting it wrong is with the splice?