From f73326402a14e226e8cb2969ba86130c3f73b535 Mon Sep 17 00:00:00 2001 From: Nicolas Murua Date: Wed, 13 May 2026 20:58:09 -0300 Subject: [PATCH] ejercicio 6 --- ejercicios-clase-8.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index 13c9599..3a809a7 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -62,4 +62,13 @@ function agregarComidasLitoral() { contenedor.appendChild(lista); document.body.appendChild(contenedor); +} + +function limpiarLista(idLista){ + + const items = document.querySelectorAll(`#${idLista} li`); + + for (const item of items){ + item.remove(); + } } \ No newline at end of file