![]() |
syntactic unit > statement > control flow statement > loop statement > for loop |
![]() ![]() | ||||
for loop | ||||
subject | fact |
for loop | can be interchanged with a while loop ![]() | ![]() |
has advantage all the information about controlling the loop is kept in one place ![]() | ![]() | |
has disadvantage it can be slightly harder to read the code of a for loop than a while loop ![]() | ![]() | |
has example a is an array of some kind | ![]() | |
has syntax for(initializer; condition; incrementer) | ![]() | |
has part incrementor ![]() | ![]() | |
has part initializer ![]() | ![]() | |
is a subtopic of Loops and Decision Making | ![]() | |
is a kind of loop statement | ![]() | |
is a kind of loop statement | ![]() | |
loop statement | has purpose to execute a section of code more than once | ![]() |
statement | is terminated by a semicolon ![]() | ![]() |
should be not more than one line long if possible | ![]() | |
syntactic unit | has syntax rule bold = mandatory | ![]() |