# JS syntax - For loops
[[JS Syntax]]
## For loops
https://www.w3schools.com/js/js_loop_for.asp
A loop that iterates over the numbers 0-4
```js
for(let i = 0; i < 5; i++)
```
The parts of this for loop:
```js
for(
let i = 0; /*set variable i before the loop runs*/
i < 5; /*define what must be true for the loop to run*/
i++ /*operation to run during every loop - increase i by 1*/
)
```