In this example, the loop first checks to see if the variable x is less than 5. Because it is, it will enter the loop, printing the value of x and then increment x by 1. After completing the code block, it will continue to repeat the code block until x is equal to 5. When x is equal to five, the condition evaluates to false and the code exits the while loop. A loop that continues repeating forever is possible if the condition is always true. When this happens, it is up to the developer to create a statement to exit the loop. An example of this is shown below:  