Workshop › Endless Runner › Step 15 of 19
Top right, like the classic runner: the high score and the current score, each with 5 digits.
```js
const score = Math.floor(distance / 10)
ctx.fillStyle = '#334155'
ctx.font = '16px monospace'
ctx.textAlign = 'right'
ctx.fillText('HI ' + String(best).padStart(5, '0') + ' ' + String(score).padStart(5, '0'), canvas.width - 10, 24)
```padStart(5, '0') adds zeros in front until the text is 5 characters long: 42 becomes 00042.monospace makes every digit the same width, so the numbers do not jiggle as they change.In draw, between the obstacles loop and ctx.textAlign = 'center', write the score lines.
Skills: Drawing on a canvas
← Remember the best run Birds →