First the simple one, just never use goto ![]()
Next up, most loops can be transformed into each other but it might be handy to use a particular form.
For example, if you want to check if the outcome of some test is within limits it would be logical to use a do-while loop. Because he, you need to at least do the stuff one to know the outcome.
But if you want to loop over a set of unknown length, it's pretty stupid to first do something and only check afterwards. So while() or for() is more logical. Especially for() if you need to initiate something before you start (like a loop variable).
If, else and if else has nothing to do with looping
It just decides if you want to do something or not ![]()