const mostRecentScore = document.localStorage.getItem('mostRecentScore') get item undefined code example
Example: get localstorage
function get(){
var getJson = localStorage.getItem('key')
if(getJson){
arrayName = JSON.parse(getJson)
}
}