ejercicio 4
This commit is contained in:
@@ -18,3 +18,9 @@ const nuevoitem = document.createElement("li")
|
||||
nuevoitem.textContent = comida;
|
||||
lista.appendChild(nuevoitem);
|
||||
}
|
||||
//ejercicio 4
|
||||
const parrafos = document.querySelectorAll("#parrafos p");
|
||||
for (const parrafo of parrafos){
|
||||
if (parrafo.textContent.includes ("importante"))
|
||||
parrafo.classList.add("destacado")
|
||||
}
|
||||
Reference in New Issue
Block a user