Ejercicio 3 resuelto

This commit is contained in:
2026-05-25 14:19:02 -03:00
parent 2165677d15
commit 18c88a99b0

View File

@@ -10,4 +10,13 @@ function agregarLista() {
for (const item of items) { for (const item of items) {
item.classList.add("resaltada"); item.classList.add("resaltada");
} }
} }
const lista = document.querySelector("ul");
function agregarItem(){
const nuevoItem = document.createElement("li");
let itemAgregado = prompt("Ingresa un nuevo item");
nuevoItem.textContent = itemAgregado;
lista.appendChild(nuevoItem);
}