Clase 8 ejercicio DOM #8

Open
maderademarco.sergio wants to merge 9 commits from maderademarco.sergio/clase-8-DOM:ejercicio-8 into main
Showing only changes of commit e9dcded1f6 - Show all commits

View File

@@ -39,7 +39,7 @@ function destacarParrafos() {
}
}
}
// Ejercicio 5
// 5
function agregarComidasLitoral() {
const div = document.createElement("div");
@@ -95,4 +95,13 @@ function agregarComidasLitoral() {
div.appendChild(lista);
document.body.appendChild(div);
}
// 6
function limpiarLista(idLista) {
const items = document.querySelectorAll(`#${idLista} li`);
for (const item of items) {
item.remove();
}
}