Lesson 2 of 11 · 7 min
Loops inside loops
A nested loop is a loop inside another loop. To print a grid of stars, an outer loop handles each row and an inner loop handles each star in that row. Nested loops are powerful for grids, patterns and tables.
⭐⭐⭐
⭐⭐⭐
⭐⭐⭐
An outer loop for rows, inner loop for columns
Let’s try it! ✍️
Question 1 of