Workshop › Breakout › Step 16 of 39
Five rows of eight: we wrap the column loop in a row loop. The inner loop runs completely for every row.
```js
const ROWS = 5
for (let row = 0; row < ROWS; row++) {
for (let col = 0; col < COLS; col++) {
bricks.push({ x: LEFT + col * (BRICK_W + GAP), y: TOP + row * (BRICK_H + GAP), row, alive: true })
}
}
```row from 0 to 4; for each row the inner loop counts col from 0 to 7.y.{ row } is shorthand for { row: row }.const COLS = 8 write const ROWS = 5.buildBricks, wrap the column loop in the row loop and change the push line as shown.Skills: Loops
← Draw the bricks A color for every row →