for

The for loop starts from an initial condition and iterates through the statements enclosed within the { code block } until the test is false.

 

The initial condition, test and iterator are separated by a semi-colon ;

 

for (initialiser ; test ; iterator) {

statements ;

statements ;

}

Leave a Reply