A simpler statement that I understand better is: a While-loop is a control flow statement that allows code to be executed repeatedly based on a given boolean condition. It can be thought of a repeating 'if' statement. The while consists of a block of code and a condition. The condition is evaluated, and if true, the code runs. This repeats until the condition becomes false.
No comments:
Post a Comment