- Inside the loop, add a check to make sure that the counter is even (
i % 2 === 0).
- If the check is executed, increase the variable
- Inside the condition, after increasing the sum, log the
'even number'string in the console.
- After the check is complete, add the
elsebranch and increase the
suminside it by
- Inside the
else, after increasing the
sum, log the
'odd number'line in the console.