Console log every even number

Console log every even number
0

What am I doing wrong? Instead of number I’m trying to print the even number foods

i only refers to the number you declared in the for loop.

Try logging foods with the i index, so

foods[i]

1 Like