Workshop › Snake › Step 2 of 28
The canvas itself cannot draw. We ask it for a 2D context: the object with all the drawing commands.
```js
const ctx = canvas.getContext('2d')
```canvas.getContext('2d') asks the canvas for its 2D drawing tools.ctx (short for context); every drawing line will start with ctx.Write the line under const canvas = ..., then press Run.
Skills: Drawing on a canvas
← Find the canvas Paint the board →