Sectionย 1. Chapterย 12
single
Challenge: Filter Even Numbers
Swipe to show menu
Task
Swipe to start coding
Write a function that prints only the odd numbers from the provided array using a while loop and the continue statement.
- Loop through each element in the numbers array using a while loop.
- Use the continue statement to skip any even numbers.
- Print each odd number to the console.
Solution
Everything was clear?
Thanks for your feedback!
Sectionย 1. Chapterย 12
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat