Workshop › Pinball › Step 22 of 42
While a bumper's counter is above 0 it is drawn yellow instead of red.
```js
BUMPERS.forEach((b, i) => {
ctx.fillStyle = flash[i] > 0 ? '#fde047' : '#e11d48'
```forEach also takes the index i.condition ? a : b picks a if the condition is true, otherwise b: yellow while lit, red otherwise.In draw, change the bumpers' forEach to (b, i) and its color line to the ? : choice.
Skills: Drawing on a canvas
← Remember which bumper was hit Lit for a moment, points once →