Assignment021
While Loop
Another useful programming structure is the while loop.
- The while loop requires one parameter, just the condition.
- The condition is used to determine how many times to run the loop.
The loop will continue to run while the condition is true.Once the
condition is no longer true, the next line of JavaScript code will
execute.
- The while loop will only run if the condition is true.