# while The `while` loop executes a block of code as long as a specified condition is true. The condition is evaluated before each iteration, so if it is false from the start, the body never runs. It is used when the number of iterations is not known in advance. Visit the following resources to learn more: - [@article@While Statement - MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) - [@article@The while Loop - CodeGuage](https://www.codeguage.com/courses/js/loops-while-loop)