This lesson requires a premium membership to access.
Premium membership includes unlimited access to all courses, quizzes, downloadable resources, and future content updates.
Ask questions about this lesson and get instant answers.
The general format of the while statement is:
1while (condition) {
2 statement
3}
4Note that a while loop may never execute the statement. The statement is executed repeatedly until condition becomes false.
In contrast, a repeat loop has the general format as below:
1repeat {
2 print('test')
3}
4