Flow of Execution of the for LoopΒΆ
- As a program executes, the interpreter always keeps track of which statement is about to be executed.
- We call this the control flow, of the flow of execution of the program.
- Control flow until now has been strictly top to bottom, one statement at a time. The
for
loop changes this.
Flow of control is often easy to visualize and understand if we draw a flowchart.
This flowchart shows the exact steps and logic of how the for
statement executes.