ejercicios DOM #10

Open
scarano.luca wants to merge 8 commits from scarano.luca/clase-8-DOM:ejercicios into main
Showing only changes of commit ad2f54d04c - Show all commits

View File

@@ -10,4 +10,11 @@ for (const item of items) {
item.classList.add("item-lista");
item.style.color = "red"
}
}
//ejercicio 3
function agregaritem(comida){
const lista = document.querySelector("#lista-inicial");
const nuevoitem = document.createElement("li")
nuevoitem.textContent = comida;
lista.appendChild(nuevoitem);
}