learnmorphcontrol_flowWhile LoopOn this pageWhile Loop Repeat a block while a condition is true. Syntax while (condition) { // body} Example count is 0;while (count < 5) { Print(count); count++;}// prints: 0 1 2 3 4 Infinite Loop while (true) { // runs forever unless break is used if (shouldStop) { break; }} Next Steps For Loop