diff --git a/clase-9.js b/clase-9.js index 6df1007..a3d6541 100644 --- a/clase-9.js +++ b/clase-9.js @@ -1 +1,13 @@ // Agregar acá el código javascript para los ejercicios + +// Ejercicio 1 + +const clickCounter = document.getElementById('clickCounter'); +const clickButton = document.getElementById('clickButton'); + +let count = 0; + +clickButton.addEventListener('click', () => { + count++; + clickCounter.textContent = count; +}); diff --git a/index.html b/index.html index 2a6b85f..517f21e 100644 --- a/index.html +++ b/index.html @@ -9,7 +9,8 @@
Este boton ha sido clickeado 0 veces
+