There are 3 ways you check the exit condition of a loop.
- Top testing. When the condition is checked before any actions are ran.
- Middle testing. when exit can be done at the middle of the loop
- Bottom testing. When exit condition checked after all actions ran.