Please enable JavaScript to use CodeHS

CodeHS Glossary


While Loop General

A while loop lets us repeat code **as long as a [condition][1] is true**. In Karel, a while loop looks like: while(frontIsClear()){ move(); } This keeps moving karel as long as the front is clear. [1]: http://codehs.com/glossary/term/6