0Pricing
Javascript for Kids · Lesson

Why We Use Loops

Loops repeat work so you do not have to.

Why Loops? 🔁

Hi, loop explorer! 🌟 Imagine you have to say "hello" 100 times. Yawn! 😴

A loop lets the computer repeat work for us. So clever! 🪄

console.log("Hello!")
console.log("Hello!")
console.log("Hello!")

Repeating is Boring by Hand 😮‍💨

Writing the same line over and over is slow and tiring.

Look how many lines just to say hi three times! There must be a better way. 🤔

console.log("Hi 1")
console.log("Hi 2")
console.log("Hi 3")

All lessons in this course

  1. Why We Use Loops
  2. Counting with a for Loop
  3. Repeating with while
  4. Drawing Patterns with Loops
← Back to Javascript for Kids