Task: Printing a Sequence
Compito
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).
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 1. Capitolo 68
single
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione
Fantastico!
Completion tasso migliorato a 1.33
Task: Printing a Sequence
Scorri per mostrare il menu
Compito
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).
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 1. Capitolo 68
single