assets/js/script.js
//gets user input and displays score 
gets user input and displays score
gets user input and displays score
function userInput() {
    var yourScore = document.getElementById('yourScore')
    yourScore.innerHTML += grade
    var btn = document.getElementById('submit')
    btn.addEventListener("click", function () {
        var initials = document.getElementById("initials").value.trim()
        var userScore = { initials: initials, grade: grade }
        high = JSON.parse(localStorage.getItem("scores")) || [];
        high.push(userScore)
        console.log(high)
        localStorage.setItem("scores", JSON.stringify(high));
        scores()
    })
}
function userInput ( ) { var yourScore = document . getElementById ( 'yourScore' ) yourScore . innerHTML += grade var btn = document . getElementById ( 'submit' ) btn . addEventListener ( "click" , function ( ) { var initials = document . getElementById ( "initials" ) . value . trim ( ) var userScore = { initials : initials , grade : grade } high = JSON . parse ( localStorage . getItem ( "scores" ) ) || [ ] ; high . push ( userScore ) console . log ( high ) localStorage . setItem ( "scores" , JSON . stringify ( high ) ) ; scores ( ) } ) }
gets user input and displays score
gets user input and displays score