Agrego ejercicio 4 de la clase 8

This commit is contained in:
Lucio Gaibazzi
2026-05-26 00:21:02 -03:00
parent 0d5a1d045c
commit 63f22a7dbc

View File

@@ -29,3 +29,17 @@ function agregarItem(comidas) {
nuevoItem.textContent = comidas; nuevoItem.textContent = comidas;
lista.appendChild(nuevoItem); 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");
}
}
}