Loop

Loops execute the same block of code multiple times, there is no piece of software without there is some sort of loop. Javascript support several sort of loops:

The For loop

You can use the for loop if you know in from the amount of loops,.

for (variable=startvalue; variable<=endvalue; variable=variable+incrementfactor) 
{
// Here goes the script lines you want to loop.
} 

The While loop

You can use the while loop if you don't know in front the amount of loops but a condition when the loop has to stop

while (variable<=endvalue) 
{
// Here goes the script lines you want to loop.
}

The break keyword

The break keyword stops the loop

if (value==0) {
           break
};

The continue keyword

The continue keyword stops the current loop and go further with the next.

for (value=-50; value<=50; value=value+1)
{
if (value==0) {continue};
document.write((100/value)+"
"); }

{{opmerking.Naam}}:

{{opmerking.OpmerkingText}}

            

Saving your comment....

Naam is verplicht!
Email is verplicht!
Opmerking is verplicht!