diff --git a/clase-9.js b/clase-9.js index 6df1007..83dca61 100644 --- a/clase-9.js +++ b/clase-9.js @@ -1 +1,12 @@ // Agregar acá el código javascript para los ejercicios + +//Ejercicio 1 de la clase 9 + +let clicks = 0; +const boton = document.querySelector("#botonEjc1"); +const parrafo = document.querySelector("#textoContador"); + +boton.addEventListener("click", function(){ + clicks++; + parrafo.textContent = `Botón clickeado ${clicks} veces`; +}); \ No newline at end of file diff --git a/index.html b/index.html index 2a6b85f..003ccda 100644 --- a/index.html +++ b/index.html @@ -10,6 +10,8 @@
Botón clickeado 0 veces