From 0b8e8b5bd7edc131568befc05e5122faa0f814af Mon Sep 17 00:00:00 2001 From: Facundo Saucedo <43495919@terciariourquiza.edu.ar> Date: Wed, 20 May 2026 15:44:02 -0300 Subject: [PATCH] feat: add click counter button interaction --- clase-9.js | 12 ++++++++++++ index.html | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) 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 @@

Clase 9 - Eventos

- +

Este boton ha sido clickeado 0 veces

+