From 63f22a7dbcfc4bf7aafe5afc84a57455a93c3a24 Mon Sep 17 00:00:00 2001 From: Lucio Gaibazzi Date: Tue, 26 May 2026 00:21:02 -0300 Subject: [PATCH] Agrego ejercicio 4 de la clase 8 --- ejercicios-clase-8.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index 8c764f5..60cfdfd 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -28,4 +28,18 @@ function agregarItem(comidas) { const nuevoItem = document.createElement("li"); nuevoItem.textContent = comidas; lista.appendChild(nuevoItem); +} + + + +//Ejercicio 4 de la clase 8. + +function destacarParrafos() { + const selecparrafos = document.querySelectorAll("#parrafos p"); + + for (const parrafo of selecparrafos) { + if (parrafo.textContent.includes("importante")) { + parrafo.classList.add("destacado"); + } + } } \ No newline at end of file