JavaScript For Loop
The for loop is used to execute a statement or set of statements repeatedly for a specific numbers of times.
The Syntax of for Loop is as follows:
For (initialization: test condition; iteration statement)
{
Statement(s) to be executed if test condition is true
}
Flowchart of for Loop
Example1 - JavaScript program to print numbers from 1 to 10 using for loop:
Output