script.js
//Opens the High Scores form for user to enter intials and loads a ranked list from local storage.
Opens the High Scores form for user to enter intials and loads a ranked list from local storage.
Opens the High Scores form for user to enter intials and loads a ranked list from local storage .
function init() {
    modalEl.style.display = "block";
    var storedHighScores = JSON.parse(localStorage.getItem("highScores"));
    if (storedHighScores) {
        storedHighScores.sort(function(a,b){
            return b.score - a.score; });
        highScores = storedHighScores;
    }
    renderHighScores();
}
function init ( ) { modalEl . style . display = "block" ; var storedHighScores = JSON . parse ( localStorage . getItem ( "highScores" ) ) ; if ( storedHighScores ) { storedHighScores . sort ( function ( a , b ) { return b . score - a . score ; } ) ; highScores = storedHighScores ; } renderHighScores ( ) ; }
Opens the High Scores form for user to enter intials and loads a ranked list from local storage.
Opens the High Scores form for user to enter intials and loads a ranked list from local storage .