Inside the code editor we've tried to write a function that takes a number n as argument and prints to the console the odd numbers from 0 through n.
So when we called printOddNumbers(8), we expected our code to print:
1
3
5
7
but it seems like we made some mistakes because when we run our code, it prints nothing.
Assignment:
Your task is to fix our function such that it prints the odd numbers from 0 through n.
Free plan: 30 tutor messages. Premium is unlimited.
Saved
Ctrl + Enter to check