For Loop In JavaScript
Jul 10, 2017 · 1 min read

In JavaScript we have several condition loops: one of them is the for loop.
This type of loop is used when we want to run a loop for a certain number of times.
It is composed of 3 parts:
- “for” keyword: tell the JavaScript interpreter that the code that encounter after is a for loop.
- Condition: composed by 3 parts: initialization of the counter commonly called i or index; condition that make the loop run until it reaches a value of false; update of the counter variable.
- Code block: instructions that are executed if the condition is evaluated with a value of true.

That’s the very basic of the for loop in JavaScript.
