Workshop › Sudoku › Step 24 of 28
The fastest solve is saved in localStorage, but only if no hint was used. The best time and the hints so far are shown
on the right.
```js
let best = Number(localStorage.getItem('sudoku-best')) || 0
const seconds = Math.floor(frames / 60)
if (hints === 0 && (best === 0 || seconds < best)) {
best = seconds
localStorage.setItem('sudoku-best', best)
}
ctx.textAlign = 'right'
ctx.fillText('Best ' + (best ? clock(best) : '-') + ' Hints ' + hints, canvas.width - LEFT, 34)
```best === 0) or it is faster.best ? clock(best) : '-' shows a dash until there is a record.let hints, write best.checkWin, save the record.draw, under the Time line, write the right-aligned line.Skills: Game states