Assignments for The Complete JavaScript Course by Jonas Schmedtmann Help

Iteration: The for Loop

  1. There are elections in your country! in a small town, there are only 50 voters. Use a for loop to simulate the 50 people voting, by logging a string like this to the console (for numbers 1 to 50): 'Voter number 1 is currently voting'.

for (let voter = 1; voter <= 50; voter++) console.log(`Voter number ${voter} is currently voting`);