Just as the “for loop” repeated all the statements within the loop body, “while loop” also does the same thing. It is another type of loop that repeats everything inside the loop until the loop condition is false.
The typical structure of while loop is given below.
i = 0
While( i < n)
The while loop has the statement ‘The Value of I is + i’ which is repeated n times when the loop executes.
The HTML file – loop2.HTML