Please enable JavaScript to use CodeHS

Tennessee Coding I

Lesson 6.7 The Break Statement

Description

In this lesson, students will learn how to create a Loop and Half. A Loop and a Half is a specific way to write a while loop with the condition being true. Inside the loop, students use a break statement to break out of the loop whenever that condition is met, causing the loop to end.


Objective

Students will be able to:

  • Explain how the loop-and-a-half structure is different from a traditional while loop
  • Explain what an infinite loop is
  • Explain what the break statement does