Why does this code run without errors, but not delete anything from obj?
function removeEvenValues(obj) {
for (i=0; i < obj.length;++i)
if (obj[i].value%2===0)
delete obj[i];
return obj;
}
const obj = {a:1, b:2 ,c:3, d:4}
const res = removeEvenValues(obj);
console.log(res);
if (obj[i].value%2===2)?objit's really difficult to help if we don't know what that looks like.obj ={a:1,b:2,c:3,d:4}?