function highScoreList (event) {
    var highScoreButton = event.target;
    if (scoresArray.length < 1) {
        alert("No scores saved.");
    }
    else {
        countdown = "clear";
        document.querySelector("header").style.display = 'none';
        scoreDiv.innerHTML = "";
        footer.innerHTML = "";
        var introP = document.querySelector(".heading p");
        introP.remove();
        questionHolder.textContent = "High Scores";
        buttonsDiv.innerHTML = "";
        buttonsDiv.className = "score-list";
        var highScoreHeader = document.createElement("p");
        highScoreHeader.innerHTML = "Initials";
        highScoreHeader.className = "title";
        var highscoreHeadertwo = document.createElement("p");
        highscoreHeadertwo.className = "title";
        highscoreHeadertwo.innerHTML = "Scores"
        buttonsDiv.appendChild(highScoreHeader);
        buttonsDiv.appendChild(highscoreHeadertwo);
        for (var i = 0; i < scoresArray.length; i++) {
            var initials = scoresArray[i].initials;
            var savedScore = scoresArray[i].score;
            var scoreInitalsP = document.createElement("p");
            scoreInitalsP.textContent = initials
            var scoreP = document.createElement('p');
            scoreP.textContent = savedScore;
            buttonsDiv.appendChild(scoreInitalsP);
            buttonsDiv.appendChild(scoreP);
        }
        //  scorebuttons dive to append to buttonsDiv
        var scoreButtonsDiv = document.createElement('div');
        scoreButtonsDiv.className="score-buttons"
        var backButton = document.createElement("button");
        backButton.className = 'btn back-btn';
        backButton.textContent = "Back"
        scoreButtonsDiv.appendChild(backButton);
        var clearButton = document.createElement('button');
        clearButton.className = 'btn clear-btn'
        clearButton.textContent = "Clear Scores";
        scoreButtonsDiv.appendChild(clearButton);
        footer.appendChild(scoreButtonsDiv);
        backButton.addEventListener("click", backButtonAction);
        clearButton.addEventListener("click", clearButtonAction);
    }
}
// High score button to show highscore
High score button to show highscore
High score button to show highscore
function highScoreList (event) {
    var highScoreButton = event.target;
    if (scoresArray.length < 1) {
        alert("No scores saved.");
    }
    else {
        countdown = "clear";
        document.querySelector("header").style.display = 'none';
        scoreDiv.innerHTML = "";
        footer.innerHTML = "";
        var introP = document.querySelector(".heading p");
        introP.remove();
        questionHolder.textContent = "High Scores";
        buttonsDiv.innerHTML = "";
        buttonsDiv.className = "score-list";
        var highScoreHeader = document.createElement("p");
        highScoreHeader.innerHTML = "Initials";
        highScoreHeader.className = "title";
        var highscoreHeadertwo = document.createElement("p");
        highscoreHeadertwo.className = "title";
        highscoreHeadertwo.innerHTML = "Scores"
        buttonsDiv.appendChild(highScoreHeader);
        buttonsDiv.appendChild(highscoreHeadertwo);
        for (var i = 0; i < scoresArray.length; i++) {
            var initials = scoresArray[i].initials;
            var savedScore = scoresArray[i].score;
            var scoreInitalsP = document.createElement("p");
            scoreInitalsP.textContent = initials
            var scoreP = document.createElement('p');
            scoreP.textContent = savedScore;
            buttonsDiv.appendChild(scoreInitalsP);
            buttonsDiv.appendChild(scoreP);
        }
        var scoreButtonsDiv = document.createElement('div');
        scoreButtonsDiv.className="score-buttons"
        var backButton = document.createElement("button");
        backButton.className = 'btn back-btn';
        backButton.textContent = "Back"
        scoreButtonsDiv.appendChild(backButton);
        var clearButton = document.createElement('button');
        clearButton.className = 'btn clear-btn'
        clearButton.textContent = "Clear Scores";
        scoreButtonsDiv.appendChild(clearButton);
        footer.appendChild(scoreButtonsDiv);
        backButton.addEventListener("click", backButtonAction);
        clearButton.addEventListener("click", clearButtonAction);
    }
}
function highScoreList ( event ) { var highScoreButton = event . target ; if ( scoresArray . length < 1 ) { alert ( "No scores saved." ) ; } else { countdown = "clear" ; document . querySelector ( "header" ) . style . display = 'none' ; scoreDiv . innerHTML = "" ; footer . innerHTML = "" ; var introP = document . querySelector ( ".heading p" ) ; introP . remove ( ) ; questionHolder . textContent = "High Scores" ; buttonsDiv . innerHTML = "" ; buttonsDiv . className = "score-list" ; var highScoreHeader = document . createElement ( "p" ) ; highScoreHeader . innerHTML = "Initials" ; highScoreHeader . className = "title" ; var highscoreHeadertwo = document . createElement ( "p" ) ; highscoreHeadertwo . className = "title" ; highscoreHeadertwo . innerHTML = "Scores" buttonsDiv . appendChild ( highScoreHeader ) ; buttonsDiv . appendChild ( highscoreHeadertwo ) ; for ( var i = 0 ; i < scoresArray . length ; i ++ ) { var initials = scoresArray [ i ] . initials ; var savedScore = scoresArray [ i ] . score ; var scoreInitalsP = document . createElement ( "p" ) ; scoreInitalsP . textContent = initials var scoreP = document . createElement ( 'p' ) ; scoreP . textContent = savedScore ; buttonsDiv . appendChild ( scoreInitalsP ) ; buttonsDiv . appendChild ( scoreP ) ; } var scoreButtonsDiv = document . createElement ( 'div' ) ; scoreButtonsDiv . className = "score-buttons" var backButton = document . createElement ( "button" ) ; backButton . className = 'btn back-btn' ; backButton . textContent = "Back" scoreButtonsDiv . appendChild ( backButton ) ; var clearButton = document . createElement ( 'button' ) ; clearButton . className = 'btn clear-btn' clearButton . textContent = "Clear Scores" ; scoreButtonsDiv . appendChild ( clearButton ) ; footer . appendChild ( scoreButtonsDiv ) ; backButton . addEventListener ( "click" , backButtonAction ) ; clearButton . addEventListener ( "click" , clearButtonAction ) ; } }
High score button to show highscore
High score button to show highscore
//  scorebuttons dive to append to buttonsDiv