Introduction
In this lab, you will learn how to use loops in JavaScript. Loops are a fundamental concept in programming that allow you to execute a block of code repeatedly. This is useful for tasks like iterating over lists of data or performing an action a specific number of times.
You will explore the three main types of loops in JavaScript:
forloop: Repeats a block of code a known number of times.whileloop: Repeats a block of code as long as a specified condition is true.do-whileloop: Similar to awhileloop, but it executes the code block at least once before checking the condition.
You will also learn how to use the break statement to exit a loop early.
All your work will be done in the WebIDE. You will write JavaScript code in the script.js file, which is already linked in index.html. You can see the output of your code by switching to the Web 8080 tab in the lab environment.






