One of a computer's greatest abilities is to repeat a task over and over so we don't have to. Loops let us tell the computer to loop over a block of code so that we don't have to write out the same process over and over.
Loops are especially helpful when we have an array where we'd like to do something to each item in the array, like logging each item to the console.
There are two kinds of loops we will learn in this lesson:
for loops, which let us loop a block of code a known amount of times.
while loops, which let us loop a block of code an unknown amount of times.