The most common type of for
loop, it includes three parts: initialization, condition, and iteration.
for (let i = 0; i < 10; i++) {
console.log(i);
}
let i = 0
- Initializes the loop variable.i < 10
- The loop runs as long as this condition is true.i++
- Increments the loop variable after each iteration.