From 960bf48a5943ca0af44c73550e44255d6dec69ec Mon Sep 17 00:00:00 2001 From: Nicolas Murua Date: Wed, 13 May 2026 21:04:07 -0300 Subject: [PATCH] ejercicio 6 --- ejercicios-clase-8.js | 6 ++++++ 1 file changed, 6 insertions(+) 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