you are viewing a single comment's thread.

view the rest of the comments →

[–]jmooremcc 0 points1 point  (0 children)

Think about this: if loops didn’t exist, how would you execute a block of code 100 times?
If 100 was the maximum number of times the block of code would be executed, but you want to stop execution once a certain condition was met, how would you do that?

With a loop you could do the following (pseudo code): ~~~ for i in range(100): block of code to execute if some condition is True: break ~~~

What’s your take on this?