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.