A while loop has just a test. If the condition in the test is true the entire body of the loop executes, even if the condition becomes false inside the loop. When body of the loop ends, the test is made again. A while loop executes 0 or more times.
Please study the material at each of the links below.