Task: Printing a Sequence
Task
Swipe to start coding
Write a program that prints the first ten even numbers.
- Create a
forloop with these parameters:- Initialization: start
iat1. - Condition: continue the loop while
i <= 10. - Update: increase
iby1after each iteration.
- Initialization: start
- Inside the loop, use
console.logto print the value ofi * 2. This will display the first ten even numbers (2, 4, 6, β¦, 20).
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 6. ChapterΒ 2
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Suggested prompts:
Can you explain that in simpler terms?
What are some examples related to this topic?
How does this information apply to real-world situations?
Awesome!
Completion rate improved to 1.33
Task: Printing a Sequence
Swipe to show menu
Task
Swipe to start coding
Write a program that prints the first ten even numbers.
- Create a
forloop with these parameters:- Initialization: start
iat1. - Condition: continue the loop while
i <= 10. - Update: increase
iby1after each iteration.
- Initialization: start
- Inside the loop, use
console.logto print the value ofi * 2. This will display the first ten even numbers (2, 4, 6, β¦, 20).
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 6. ChapterΒ 2
single