Challenge: Filter Even Numbers
Tâche
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
Tout était clair ?
Merci pour vos commentaires !
Section 2. Chapitre 6
single
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Awesome!
Completion rate improved to 5.56
Challenge: Filter Even Numbers
Glissez pour afficher le menu
Tâche
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
Tout était clair ?
Merci pour vos commentaires !
Section 2. Chapitre 6
single