for

Example: for

A control flow keyword used to perform an action repeatedly.

for (initial_expression, conditional_expression, loop_expression)

All three expressions in the for statement are evaluated. If the initial or conditional expressions are false or become false, the for loop terminates. The initial_expression is evaluated at the start of loop execution only. At each iteration, the conditional_expression and the loop_expression are evaluated. The loop_expression is typically used to increment an index which the conditional_expression uses to terminate the loop.