Workshop › Pong › Step 18 of 26
The scores go on the screen, big, one on each half of the court, like the classic Pong.
```js
ctx.font = '48px monospace'
ctx.textAlign = 'center'
ctx.fillText(String(left.score), canvas.width / 4, 60)
ctx.fillText(String(right.score), (canvas.width * 3) / 4, 60)
```monospace is a font where every character is the same width, like old computer screens.canvas.width / 4 is the middle of the left half; (canvas.width * 3) / 4 the middle of the right half.String(...) turns the number into text for fillText.At the end of draw, under the ball line, leave an empty line and write the four lines.
Skills: Drawing on a canvas
← Keep the score First to five →