Resolucion del 4to ejercicio

This commit is contained in:
Bruno
2026-05-16 18:36:38 -03:00
parent 66ef232929
commit 898d4ccdbe

View File

@@ -28,3 +28,11 @@ function agregarItem(texto) {
nuevoElemento.textContent = texto;
lista.appendChild(nuevoElemento);
}
//ejercicio 4
const parrafos = document.querySelectorAll("#parrafos p");
parrafos.forEach(p => {
if (p.textContent.includes("importante")) {
p.classList.add("destacado");
}
});