A for loop repeats a block while its condition is true.
for (let step = 1; step <= 3; step += 1) {
console.log("Step:", step);
}
// Output:
// Step: 1
// Step: 2
// Step: 3let step = 1 sets the starting value once.step <= 3 is checked before each repetition; false means stop.step += 1 increases the counter after each repetition.A warm-up contains four exercises. Use one for loop to display Exercise: 1 through Exercise: 4 on separate lines.