我有一些类似快速打字的游戏。它将分数保存到变量中,直到游戏再次开始。我想将此分数保存为高分,并且当用户做得更好时,只需更改分数即可。并在表上按分数列出10个用户?我怎样才能做到这一点 ?谢谢!
let score = 0;
// Here it sets the score to 0 again
function checkStatus() {
if (!isPlaying && time === 0) {
message.innerHTML = 'Game Over!!!';
score = -1;
}
}