0PricingLogin
Javascript for Kids · Lesson

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

  1. A Loop Inside a Loop
  2. Rows and Columns
  3. Star Triangles
  4. A Times Table
← Back to Javascript for Kids