ejercicio4
This commit is contained in:
@@ -22,3 +22,12 @@ function agregarItem(contenido){
|
||||
agregarItem("Guiso de lentejas");
|
||||
agregarItem("Milanesa napolitana");
|
||||
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