Compare commits

..

4 Commits

Author SHA1 Message Date
Lucio Gaibazzi
0d5a1d045c Agrego ejercicio 3 de la clase 8 2026-05-25 23:33:59 -03:00
Lucio Gaibazzi
fe8150b2f1 Agrego ejercicio 2 de la clase 8 2026-05-25 23:08:31 -03:00
Lucio Gaibazzi
475d4dd86b Agrego el ejercicio 1 de la clase 8 2026-05-21 23:39:12 -03:00
Lucio Gaibazzi
a3255c92f5 Agrega vinculación del formato JS en index.html 2026-05-21 22:17:05 -03:00
2 changed files with 32 additions and 0 deletions

View File

@@ -1 +1,31 @@
// Vincular este archivo al archivo index.html, y resolver aquí los ejercicios. // Vincular este archivo al archivo index.html, y resolver aquí los ejercicios.
//Ejercicio 1 de la clase 8.
function cambiarPrimerTitulo() {
const titulo = document.querySelector("h1");
titulo.textContent = "El título ha sido modificado con éxito"
}
//Ejercicio 2 de la clase 8.
function agregarItemLista() {
const items = document.querySelectorAll(".lista-comidas");
for (const item of items) {
item.classList.add("item-lista");
}
}
//Ejercicio 3 de la clase 8.
function agregarItem(comidas) {
const lista = document.querySelector("#lista-inicial");
const nuevoItem = document.createElement("li");
nuevoItem.textContent = comidas;
lista.appendChild(nuevoItem);
}

View File

@@ -31,5 +31,7 @@
<p>¿Y este párrafo? ¿Será importante?</p> <p>¿Y este párrafo? ¿Será importante?</p>
<p>Este es otro párrafo del montón.</p> <p>Este es otro párrafo del montón.</p>
</div> </div>
<script src="ejercicios-clase-8.js"></script>
</body> </body>
</html> </html>