LOOPS ALLOW US to repeat lines of code until a certain set of conditions are met. It’s another simple concept on the surface, but one that allows us to do a surprising amount of work.for
for loops in situations where you’ll be running a loop for a known number of times, or iterations. (By “known,” I don’t mean that we, the brains between the keyboards and chairs, necessarily know how many times we’ll need to go through a loop in advance; I just mean that we’ll be looping through a known quantity.)
The syntax for a loop is a little tricky, since we’re packing a lot of information into just a few characters. The basics ...