12 lines
367 B
JavaScript
12 lines
367 B
JavaScript
// Vincular este archivo al archivo index.html, y resolver aquí los ejercicios.
|
|
function cambiarText(texto){
|
|
const textoH1 = document.querySelector("h1");
|
|
textoH1.textContent = texto;
|
|
}
|
|
|
|
function agregarItem(){
|
|
const listaComida = document.querySelectorAll(".item-comida");
|
|
for (const i of listaComida){
|
|
i.classList.add("item-lista");
|
|
}
|
|
} |