diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index 037e981..c7f82d0 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -23,4 +23,15 @@ const addItem = (a) => { const newItem = document.createElement('li'); newItem.textContent = a; list.appendChild(newItem); +} + +// Ejercicio 4 + +const highlight = () => { + const paragraphs = document.querySelectorAll('#parrafos p'); + paragraphs.forEach((p) => { + if (p.textContent.toLowerCase().includes('importante')) { + p.classList.add('destacado'); + } + }); } \ No newline at end of file