Skip to content

Infinite Loop

Easy — everyone uses thisGeneral Dev

ELI5 — The Vibe Check

A loop that never stops running. It goes around and around forever because the exit condition is never met (or doesn't exist). Your fan spins up, your browser freezes, and you frantically mash Ctrl+C. Every developer has accidentally created one. It's a rite of passage.

Real Talk

An infinite loop is a loop construct that never terminates due to a missing or unreachable exit condition. It causes the program to hang, consume CPU, and become unresponsive. Common causes include off-by-one errors, incorrect loop conditions, and missing break statements.

Show Me The Code

// Accidental infinite loop
let i = 10
while (i > 0) {
  console.log(i)
  // Forgot: i--
}
// Your CPU: 🔥🔥🔥

When You'll Hear This

"The page froze — you've got an infinite loop somewhere." / "Ctrl+C! Ctrl+C! CTRL+C!!!"

Made with passive-aggressive love by manoga.digital. Powered by Claude.