JavaScript program to print numbers from 1 to 10 using for loop

72961


Following program shows you how to print numbers from 1 to 10 using for loop.

for (var input = 1; input <= 10; input++) {
 console.log(input);
}

Output:

1
2
3
4
5
6
7
8
9
10