ejercicio 3
This commit is contained in:
@@ -10,3 +10,13 @@ function agregarClase(){
|
|||||||
i.classList.add("item-lista");
|
i.classList.add("item-lista");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function agregarItem(texto){
|
||||||
|
const lista = document.querySelector("#lista-inicial");
|
||||||
|
const nuevo = document.createElement("li");
|
||||||
|
|
||||||
|
nuevo.textContent = texto;
|
||||||
|
|
||||||
|
lista.appendChild(nuevo);
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user