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

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