Respectfully requesting some help. I'm stuck on Task 3. I can pass test 8 but fail test 9. Its stating that I am not creating a new array. Here is my code:
export function fixBirdCountLog(birdsPerDay) {
const newArray = [];
for (let i = 0; i < birdsPerDay.length; i ++) {
if (i % 2 ===0) {
newArray.push(birdsPerDay[i] + 1);
} else {
newArray.push(birdsPerDay[i]);
}
}
return newArray;
}
As far as I can tell, I am creating and returning a new array. Any suggestions will be greatly appriciated.