Please enable JavaScript
A while loop is a control flow statement that executes a block of code repeatedly as long as a specified condition is true. The while loop is one of the most basic and commonly used loops in JavaScript.