diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index 3a809a7..aa66974 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -71,4 +71,10 @@ function limpiarLista(idLista){ for (const item of items){ item.remove(); } +} + +function cambiarFoto(foto, texto){ + const imagen = document.querySelector("#foto"); + imagen.setAttribute("src", foto); + imagen.setAttribute("alt", texto); } \ No newline at end of file