Rows and Columns
Make a grid.
Make a Grid! 🟦🟦
A grid is like a checkerboard or a window with little squares! It has rows (across) and columns (down). ⬜⬜⬜
Nested loops are PERFECT for drawing grids!
Building a Row 📏
To build ONE row of stars, we can join stars together using + in a string.
Let us build a row text step by step!
let row = ''
for (let col = 1; col <= 4; col++) {
row = row + '*'
}
console.log(row)All lessons in this course
- A Loop Inside a Loop
- Rows and Columns
- Star Triangles
- A Times Table