let rollSpan = document.querySelector("span"); ; if (rollSpan != undefined){ rollSpan.innerHTML = localStorage.roll; delete localStorage.roll; }