forked from marquez.juan/clase-8-DOM
ejercicio4
This commit is contained in:
@@ -22,3 +22,12 @@ function agregarItem(contenido){
|
|||||||
agregarItem("Guiso de lentejas");
|
agregarItem("Guiso de lentejas");
|
||||||
agregarItem("Milanesa napolitana");
|
agregarItem("Milanesa napolitana");
|
||||||
agregarItem("Medialunas");
|
agregarItem("Medialunas");
|
||||||
|
|
||||||
|
//ejercicio4
|
||||||
|
let parrafosImportantes = document.querySelectorAll("#parrafos > p");
|
||||||
|
for (let parrafo of parrafosImportantes){
|
||||||
|
if (parrafo.textContent.includes("importante")){
|
||||||
|
parrafo.classList.add("destacado")
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user