<button id="poner">Pon Storage</button> <button id="obtener">Obtener Storage</button> <button id="eliminar">Eliminar Storage</button> <script src="js/test.js"></script>
document.getElementById('poner').addEventListener('click', poner) document.getElementById('obtener').addEventListener('click', obtener) document.getElementById('eliminar').addEventListener('click', eliminar) localStorage.clear() function poner () { localStorage.setItem('edad', 50) } function obtener () { const edad = localStorage.getItem('edad') alert(edad) } function eliminar () { localStorage.removeItem('edad') }