feat: add changeImage function to update image source and alt text

This commit is contained in:
2026-05-14 14:40:46 -03:00
parent f80218541e
commit eda48c462d

View File

@@ -69,3 +69,10 @@ const cleanList = (id) => {
list.removeChild(list.firstChild); list.removeChild(list.firstChild);
} }
} }
// Ejercicio 7
const changeImage = () => {
const image = document.querySelector('img');
image.src = "foto2.jpg";
image.alt = 'Locro';}