feat/excersices #6

Open
saucedo.facundo wants to merge 8 commits from saucedo.facundo/clase-8-DOM:feat/excersices into main
Showing only changes of commit abe82db60b - Show all commits

View File

@@ -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');
}
});
}