Workshop › Simon Says Colors › Step 7 of 27
One variable, lit, says which pad is lit (-1 for none). Each pad picks its bright color if it is the lit pad, and
its dim color otherwise. Whatever lights a pad later only has to change lit.
```js
let lit = -1 // the pad lit right now, or -1
ctx.fillStyle = i === lit ? pad.lit : pad.dim
```let makes a variable whose value can change later.i === lit ? pad.lit : pad.dim is a short question: if this pad is the lit one, the bright color, otherwise the dim
one.PADS, leave an empty line and write the lit line.draw, change ctx.fillStyle = pad.dim as shown.Skills: Game states
← A function that draws Draw again and again →