ejercicio 3
This commit is contained in:
@@ -9,4 +9,14 @@ function agregarClase(){
|
||||
for (const i of listaComida){
|
||||
i.classList.add("item-lista");
|
||||
}
|
||||
}
|
||||
|
||||
function agregarItem(texto){
|
||||
const lista = document.querySelector("#lista-inicial");
|
||||
const nuevo = document.createElement("li");
|
||||
|
||||
nuevo.textContent = texto;
|
||||
|
||||
lista.appendChild(nuevo);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user