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")