Boom! The code just runs and runs while the counter
variable is less than 4
. In this case, it runs 3 cycles, adding up to 4
.
Psst: we've got to be sure that the condition becomes false
at some point; otherwise it'd keep running and running. Or crash.
Not quite! We'll get to for loops soon enough though.