I want to make cross button invisible when there is no localStorage.
HTML
<h1><span>History</span><span id="clear" onclick="clearall()">×</span></h1>
JS
document.getElementById("clear").style.display="none";
}
function clearall(){
if(confirm("Delete all "+localStorage.length+" calculations?")){
localStorage.clear();
}
}```