Codington
0 of 8 problems solved • 0%
Use in a course

Exercise prompt

Repeat with a for Loop

A for loop repeats a block while its condition remains true. Its setup creates a counter, and its update changes that counter after each repetition.

Example

for (let step = 1; step <= 3; step += 1) { console.log("Step:", step); }

Your task

A warm-up contains four exercises. Use one for loop to display Exercise: 1 through Exercise: 4 on separate lines.