Workshop › Simon Says Colors › Step 1 of 27
Watch the pads light up and repeat the sequence, one more color every round. Timers that drive a show, turns between the computer and the player, checking answers step by step, and a game that speeds up.
Simon is drawn on a <canvas> 400 pixels wide and 440 high, with the id game. We find it from JavaScript and ask it
for its 2D context, the object that holds every drawing command.
```js
const canvas = document.getElementById('game')
const ctx = canvas.getContext('2d')
```document is the page; getElementById('game') finds the element whose id is game.const canvas = gives what was found a name, so later lines can use it.canvas.getContext('2d') asks the canvas for its 2D drawing tools; we call them ctx (short for context).Write the two lines under the three comment lines, then press Run.
Skills: Drawing on a canvas