diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index f653fca..9246c69 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -19,4 +19,14 @@ function agregarItem(texto) { nuevaLista.textContent = texto; lista.appendChild(nuevaLista); +} + +const parrafos = document.querySelectorAll("#parrafos p"); + +for (const p of parrafos) { + + if (p.textContent.includes("importante")) { + p.classList.add("destacado"); + } + } \ No newline at end of file