Lesson 6 of 50

JavaScript Loops

Loops are used to repeat code multiple times. Instead of writing the same code again and again, JavaScript allows you to loop through logic easily.

The for Loop

for (let i = 1; i <= 5; i++) {
  console.log("Number: " + i);
}

Loops are commonly used to display lists, process data, and build dynamic content.

← Previous Next Lesson →