Task: Printing a Sequence
Taak
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).
Oplossing
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 1. Hoofdstuk 68
single
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.
Geweldig!
Completion tarief verbeterd naar 1.33
Task: Printing a Sequence
Veeg om het menu te tonen
Taak
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).
Oplossing
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 1. Hoofdstuk 68
single