Challenge: Random Multiple of 7
Task
Swipe to start coding
You are given a starting number.
Your task is to use a do-while loop to generate numbers starting from this value until you reach a multiple of 7.
Instructions
- Start with:
let number = 3; - Use a
do-whileloop that:- Adds the current
numberto an array. - Increments the
numberby 1. - Continues running while the previous
numberis not a multiple of 7.
- Adds the current
- Return all generated numbers.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 6. ChapterΒ 6
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 1.35
Challenge: Random Multiple of 7
Swipe to show menu
Task
Swipe to start coding
You are given a starting number.
Your task is to use a do-while loop to generate numbers starting from this value until you reach a multiple of 7.
Instructions
- Start with:
let number = 3; - Use a
do-whileloop that:- Adds the current
numberto an array. - Increments the
numberby 1. - Continues running while the previous
numberis not a multiple of 7.
- Adds the current
- Return all generated numbers.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 6. ChapterΒ 6
single