Banning break and continue from your loops will improve code quality

For as long as I can remember programming, I have always avoided the  break  and continue  keywords in my loops.  Before I explain why I avoid them, I want to explain what they are.  Here’s an example:

A continue  will jump to the top of the loop and reevaluate the condition.  A break  will exit the loop.

What I don’t like about these keywords is that when you want to refactor this code, the continue s and break s step on your toes.  Here’s an animated GIF demonstrating why that is:

Continue reading