The while loop is an iterative control statement. A while loop repeatedly executes the loop's statement(s) several times as a given condition is true. Execution of the loop is terminated when the condition of the while loop becomes false and executes code after the loop.