From d5979f13db66a12e8ff7fb0b8dae1202e808ac58 Mon Sep 17 00:00:00 2001 From: Geronimo Hidalgo <45217034@terciariourquiza.edu.ar> Date: Thu, 21 May 2026 18:33:46 -0300 Subject: [PATCH] Cree una funcion para cambiar h1 --- ejercicios-clase-8.js | 6 ++++++ index.html | 1 + 2 files changed, 7 insertions(+) diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index af39c43..b238229 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -1 +1,7 @@ // Vincular este archivo al archivo index.html, y resolver aquí los ejercicios. + +// Ejercicio 1 +const changeText = (str) => { + const h1 = document.querySelector("h1"); + h1.textContent = str; +} diff --git a/index.html b/index.html index 0c393ac..ebffcd8 100644 --- a/index.html +++ b/index.html @@ -32,4 +32,5 @@

Este es otro párrafo del montón.

+