Workshop › Minesweeper › Step 2 of 26
The page has a 360×400 canvas with the id game. We find it and take its 2D drawing tools.
```js
const canvas = document.getElementById('game')
const ctx = canvas.getContext('2d')
```document.getElementById('game') finds the canvas; getContext('2d') gives its drawing tools, ctx.Write the two lines under the comment lines, above const SIZE = 9, with an empty line after them.
Skills: Drawing on a canvas
← A grid of cell objects Draw the field →