A JavaScript for loop takes the parameters initialisation, condition and loop end expression.
The parameters conditions and expressions associated with the for loop are wrapped within brackets.
for(var i = 0; i < parameters.length; i++) {
repeated action here
}
The example shown above, may be used to work through each of the entries in an array to perform some action.
In the example above the counter variable i is initialised with a value of 0. The loop will be repeated whilst the value or i is less than the length of parameters.
Frequently the for loop uses an end expression which increments or decrements the counter.


