Workshop › Space Invaders-style › Step 11 of 21
Each invader is worth points: the top row 30, the middle rows 20, the bottom rows 10. The score is shown top left.
```js
const ROW_POINTS = [30, 20, 20, 10, 10]
let score = 0
score += ROW_POINTS[hit.row]
ctx.fillStyle = 'white'
ctx.font = 'bold 16px monospace'
ctx.textAlign = 'left'
ctx.fillText('SCORE ' + score, 10, 24)
```ROW_POINTS[hit.row] gives the points of the row the hit invader was in.textAlign = 'left' makes the text start at x = 10.SPACING_Y, write ROW_POINTS; under lastStep, write score.bullet.y = -100.draw, write the score.Skills: Game states, Drawing on a canvas