Workshop › Doodle Jump-style Climber › Step 19 of 24
The best score is saved in localStorage when a game ends, and shown on the right.
```js
let best = Number(localStorage.getItem('doodle-best')) || 0
if (score > best) {
best = score
localStorage.setItem('doodle-best', best)
}
ctx.textAlign = 'right'
ctx.fillText('Best: ' + best, canvas.width - 10, 26)
```let state, write best.draw, under the score text, write the two Best lines.Skills: Game states
← Score is height Kinds of platform →