feat/excersices #6

Open
saucedo.facundo wants to merge 8 commits from saucedo.facundo/clase-8-DOM:feat/excersices into main
Showing only changes of commit 215bc5e6d2 - Show all commits

View File

@@ -14,4 +14,13 @@ const addClass = (a) => {
list.forEach((item) => {
item.classList.add(a);
});
}
// Ejercicio 3
const addItem = (a) => {
const list = document.querySelector('ul');
const newItem = document.createElement('li');
newItem.textContent = a;
list.appendChild(newItem);
}