function playAgain(x,y,z) {
    var playAgainButton = document.createElement('button')
    showScoreEl.appendChild(playAgainButton)
    playAgainButton.setAttribute('style', 'display: block; align-content: center')
    playAgainButton.textContent = 'PLay Again?'

    playAgainButton.addEventListener('click', function() {
        x.remove()
        y.remove()
        z.remove()
        playAgainButton.remove()
        for (var i = 0; i< displayType.length; i++) {
            displayType[i].setAttribute('class', 'show')
        }
        
        gameEl.setAttribute('class', 'questions')
        startGame()
    })
}
// creating a way to end the game if highscore button pressed
creating a way to end the game if highscore button pressed
creating a way to end the game if highscore button pressed
function playAgain(x,y,z) {
    var playAgainButton = document.createElement('button')
    showScoreEl.appendChild(playAgainButton)
    playAgainButton.setAttribute('style', 'display: block; align-content: center')
    playAgainButton.textContent = 'PLay Again?'
    playAgainButton.addEventListener('click', function() {
        x.remove()
        y.remove()
        z.remove()
        playAgainButton.remove()
        for (var i = 0; i< displayType.length; i++) {
            displayType[i].setAttribute('class', 'show')
        }
        gameEl.setAttribute('class', 'questions')
        startGame()
    })
}
function playAgain ( x , y , z ) { var playAgainButton = document . createElement ( 'button' ) showScoreEl . appendChild ( playAgainButton ) playAgainButton . setAttribute ( 'style' , 'display: block; align-content: center' ) playAgainButton . textContent = 'PLay Again?' playAgainButton . addEventListener ( 'click' , function ( ) { x . remove ( ) y . remove ( ) z . remove ( ) playAgainButton . remove ( ) for ( var i = 0 ; i < displayType . length ; i ++ ) { displayType [ i ] . setAttribute ( 'class' , 'show' ) } gameEl . setAttribute ( 'class' , 'questions' ) startGame ( ) } ) }
creating a way to end the game if highscore button pressed
creating a way to end the game if highscore button pressed