Educator Resources for Loops

Got a daily routine? Then you’re already familiar with loops! For humans, repeated actions can be very useful—but also kind of boring. Luckily, computers don't mind repeating themselves over and over (and over) again! They often have to perform the same action millions or even billions of times in a row. To help them do so, programmers write loops. Whether you're coding a finite loop that repeats a specific number of times, or an infinite loop that repeats forever, these shortcuts save countless lines of repetitive instructions. From JavaScript to Scratch, each programming language has its own syntax, so loops will look different in each one. But no matter which language you’re using, remember to make your commands as specific as possible! Repeat after us: Press "play" to learn more about loops!