Loading video...
More on Conditional Loops
- A do-while loop functions exactly as a while loop except that its test condition is evaluated each time after its statement group is executed.
- A continue statement is used to skip the remaining code in a loop and re-evaluate the loop’s test condition.
- A break statement can also be used in while or do-while loops to immediately halt the execution of the loop.
- Conditional loops whose test condition never evaluates to FALSE or never executes a break statement will loop indefinitely. This condition is known as an infinite loop .
- Some common pitfalls when using conditional loops are:
- counter initialization occurring within the loop
- not incrementing a loop counter within the loop
- having a necessary break statement be unreachable
- Additional Resources:
More on Conditional Loops
Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.

































Start Learning Now
Our free lessons will get you started (Flash® 10 required).
Sign up for Educator.comGet immediate access to our entire library.
Features Overview