Cursos /
Introduction to JavaScript
Challenge: Tigers
Task
Implement a for
loop that outputs the word "Tiger" exactly 5 times.
The output should be:
- Begin by assigning the value "Tiger" to the variable
tiger
. - Utilize the
for
keyword to create the loop. - Initialize the counter variable
i
. - Set the range for the counter
i
to go from0
to4
(5 loop iterations: 0, 1, 2, 3, 4). - Include the increment operation (
++
) for thei
counter. - Place the
tiger
variable inside theconsole.log()
function.
¿Todo estuvo claro?
Sección 5. Capítulo 5
Contenido del Curso
Introduction to JavaScript
4. Conditional Statements
Introduction to JavaScript
Challenge: Tigers
Task
Implement a for
loop that outputs the word "Tiger" exactly 5 times.
The output should be:
- Begin by assigning the value "Tiger" to the variable
tiger
. - Utilize the
for
keyword to create the loop. - Initialize the counter variable
i
. - Set the range for the counter
i
to go from0
to4
(5 loop iterations: 0, 1, 2, 3, 4). - Include the increment operation (
++
) for thei
counter. - Place the
tiger
variable inside theconsole.log()
function.
¿Todo estuvo claro?
Sección 5. Capítulo 5