for

Iterates through the loop, starting from the specified initial condition and will iterate through the statements enclosed within the { code block } until the test is false. The initial condition, test and iterator are separated with a semi-colon ;

 

Syntax:

for (initialisertestiterator ) {

statements ;

}

 

 

Save & refresh browser:

val = 10
val = 11
val = 12
val = 13
val = 14

Leave a Reply