The while statement or loop will execute a block of code while a given condition is true.
Note: The <= could be anything that would fit the purpose ex. >, == or whatever.
The while loop sets i equal to 0. As long as i is less than or equal to 10, the loop will continue to run. i will increase by 1 each time the loop runs.Try Now