Workshop › Tic-tac-toe › Step 3 of 33
The board is 3×3 cells of 100 pixels. We name the cell size CELL and draw the first grid line: a thin gray
rectangle standing on the border between the first and second column.
```js
const CELL = 100
ctx.fillStyle = '#585b70'
ctx.fillRect(CELL - 2, 0, 4, canvas.height)
```const CELL = 100 names the cell size once, so we never repeat the number 100.CELL - 2 is 98: a 4 pixel line that starts 2 pixels early is centered on x = 100.4, canvas.height make it 4 pixels wide and as tall as the board.const ctx = ... leave an empty line and write const CELL = 100.Skills: Drawing on a canvas
← Paint the board Repeat with a loop →