The for loop repeats a block of code as long as a certain condition is met. It is typically used to execute a block of code for certain number of times. Its syntax is:

for(initialization; condition; increment) {
    // Code to be executed
}

The parameters of the for loop statement have following meanings:

initialization — it is used to initialize the counter variables, and evaluated once unconditionally before the first execution of the body of the loop.

condition — it is evaluated at the beginning of each iteration. If it evaluates to true, the loop statements execute.

If it evaluates to false, the execution of the loop ends.
increment — it updates the loop counter with a new value each time the loop runs.