chartManD's picture
remarcar nombre
4d78433
raw
history blame contribute delete
395 Bytes
let contenedorNumero = document.getElementById("numero");
let numeroString = contenedorNumero.textContent;
let numeroActual = parseInt(numeroString);
function aumentar() {
numeroActual++;
mostrarNumero();
}
function disminuir() {
if (numeroActual == 0) {
return;
}
numeroActual--;
mostrarNumero();
}
function mostrarNumero() {
contenedorNumero.textContent = numeroActual;
}