A for loop statement is a repetition of loop and it allows to efficiently write a loop that needs to be executed a certain number of times. For loops are useful in case of multi-dimensional arrays.
There are 3 statements at the start of the for loop viz. 1. Defining the incrementer 2. Setting the condition and 3. Incrementing the incrementer
Syntax
This will produce following result