From 18c88a99b03bd0a7d020dd612a92952c64ab6642 Mon Sep 17 00:00:00 2001 From: Eugenio Zapata <37448644@terciariourquiza.edu.ar> Date: Mon, 25 May 2026 14:19:02 -0300 Subject: [PATCH] Ejercicio 3 resuelto --- ejercicios-clase-8.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index 71d2a84..fbdc9e1 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -10,4 +10,13 @@ function agregarLista() { for (const item of items) { item.classList.add("resaltada"); } -} \ No newline at end of file +} + +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); + } \ No newline at end of file