For Loops
Loops are used to repeat tasks without repeating code. The for loop is great when you know how many times you want to loop.
The Standard For Loop
A for loop has three parts: initializer (runs once), condition (checked before each run), and incrementor (runs after each run).
Looping Arrays
Loops are incredibly useful for going through lists (arrays). You can use a modern for...of loop for a cleaner syntax.
Practice
Challenge 1: Write a loop that counts down from 10 to 1.