For Loops in Javascript
For loop in javascript is most often used to execute a particular block of code with different value each time. So, to reduce the code length instead of adding number of code lines using different value each time for loop is used to execute the single line multiple times.
JavaScript Basics Examples:
You can see the live samples and examples of JavaScript Basics from the following links:
Syntax of for loop in javascript
for(var varname=startvalue; varname<=endvalue; varname++)
{
// Code block to be executed here each time;
}
Example of For Loop in JavaScript
for(var i=1;i<=7;i++)
{
document.write('<font size=\"' + i + '\">Hello World</font><br />');
}
Above example shows the use of for loop in JavaScript by executing a single line of code how you can increase the size of font in each loop by incrementing the value of variable i.
Output:
You can see the output of above discussed codes from the following link:
Continue to next tutorial: Javascript While Loops to learn the other way of Javascript iterations using while loop.

* will not be published
* hint: http://www.example.com