diff --git a/clase-9.js b/clase-9.js index 6df1007..5014129 100644 --- a/clase-9.js +++ b/clase-9.js @@ -1 +1,8 @@ // Agregar acá el código javascript para los ejercicios +//ejercicio 1 +const boton = document.querySelector("#boton"); +let contadorClicks = 0 +boton.addEventListener("click", () => { + contadorClicks = contadorClicks + 1; + boton.textContent = `Botón clickeado ${contadorClicks} veces` +}) \ No newline at end of file diff --git a/index.html b/index.html index 2a6b85f..6214d56 100644 --- a/index.html +++ b/index.html @@ -9,7 +9,7 @@

Clase 9 - Eventos

- +