For - Loop in JavaScript

For Loop is used to execute a set of statements or commands over specified number times.

General Syntax
for(variable=iStart; variable < iEnd ; variable + increment){
    // set of statements or commands
}

Example : For Loop To Print 10 numbers
for(a=1;a<=10;a++){
    document.write(a+" ");
}

Output
----------
1 2 3 4 5 6 7 8 9 10


An infinite For loop will be formed when the end condition does not match, in that case browser Hangs.