From 0d5a1d045cfc2f899d078af02e7b32190d746fc8 Mon Sep 17 00:00:00 2001 From: Lucio Gaibazzi Date: Mon, 25 May 2026 23:33:59 -0300 Subject: [PATCH] Agrego ejercicio 3 de la clase 8 --- ejercicios-clase-8.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index 3f593cc..8c764f5 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -16,4 +16,16 @@ function agregarItemLista() { for (const item of items) { item.classList.add("item-lista"); } +} + + + +//Ejercicio 3 de la clase 8. + +function agregarItem(comidas) { + const lista = document.querySelector("#lista-inicial"); + + const nuevoItem = document.createElement("li"); + nuevoItem.textContent = comidas; + lista.appendChild(nuevoItem); } \ No newline at end of file