main #15

Open
hidalgo.geronimo wants to merge 6 commits from hidalgo.geronimo/clase-8-DOM:main into main
Showing only changes of commit 8b352de3f3 - Show all commits

View File

@@ -13,3 +13,11 @@ const addClass = (className) => {
item.classList.add(className);
});
}
// Ejercicio 3
const agregarItem = (text) =>{
const list = document.querySelector("#lista-inicial");
const newLi = document.createElement("li");
newLi.textContent = text;
list.appendChild(newLi);
}