function checkHighScore() {
    if(score > localStorage.getItem("gameHighScore")) {
        localStorage.setItem("gameHighScore", score);
        highScore = score;
        highScoreDisplay.textContent = highScore;
    }
}
// This function checks the user's high score using local storage
This function checks the user's high score using local storage
This function checks the user ' s high score using local storage
function checkHighScore() {
    if(score > localStorage.getItem("gameHighScore")) {
        localStorage.setItem("gameHighScore", score);
        highScore = score;
        highScoreDisplay.textContent = highScore;
    }
}
function checkHighScore ( ) { if ( score > localStorage . getItem ( "gameHighScore" ) ) { localStorage . setItem ( "gameHighScore" , score ) ; highScore = score ; highScoreDisplay . textContent = highScore ; } }
This function checks the user's high score using local storage
This function checks the user ' s high score using local storage