From 3f3d33484ca6dd7556eccbe493ec9a4601418320 Mon Sep 17 00:00:00 2001
From: Sergio Madera De Marco <37299705@terciariourquiza.edu.ar>
Date: Thu, 28 May 2026 13:04:44 -0300
Subject: [PATCH 1/8] ejercicio 1: saludo personalizado
---
ejercicio1/ejercicio1.js | 14 +++++++++++++-
ejercicio1/index.html | 8 +++++++-
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/ejercicio1/ejercicio1.js b/ejercicio1/ejercicio1.js
index 6ce9e92..2b77f21 100644
--- a/ejercicio1/ejercicio1.js
+++ b/ejercicio1/ejercicio1.js
@@ -1 +1,13 @@
-// Agregar aquí el código javascript
+const nombreInput = document.getElementById('nombre');
+const saludarBtn = document.getElementById('saludar');
+const mensajeP = document.getElementById('mensaje');
+
+saludarBtn.addEventListener('click', () => {
+ const nombre = nombreInput.value.trim();
+
+ if (nombre === '') {
+ mensajeP.textContent = 'Por favor, ingresá tu nombre.';
+ } else {
+ mensajeP.textContent = `Hola, ${nombre}!`;
+ }
+});
diff --git a/ejercicio1/index.html b/ejercicio1/index.html
index 0a5b7d1..7b83a4c 100644
--- a/ejercicio1/index.html
+++ b/ejercicio1/index.html
@@ -2,13 +2,19 @@
-
+
Ejercicio 1
Ejercicio 1
+
+
+
+
+
+
--
2.49.1
From 9dee9e34adc9ad0103399f854e8f7612bc7b8117 Mon Sep 17 00:00:00 2001
From: Sergio Madera De Marco <37299705@terciariourquiza.edu.ar>
Date: Thu, 28 May 2026 13:15:34 -0300
Subject: [PATCH 2/8] ejercicio 2: lista de tareas simples
---
ejercicio2/ejercicio2.js | 17 ++++++++++++++++-
ejercicio2/index.html | 8 +++++++-
2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/ejercicio2/ejercicio2.js b/ejercicio2/ejercicio2.js
index 6ce9e92..c7ddf27 100644
--- a/ejercicio2/ejercicio2.js
+++ b/ejercicio2/ejercicio2.js
@@ -1 +1,16 @@
-// Agregar aquí el código javascript
+const tareaInput = document.getElementById('tarea');
+const agregarBtn = document.getElementById('agregar');
+const listaTareas = document.getElementById('lista-tareas');
+
+agregarBtn.addEventListener('click', () => {
+ const tarea = tareaInput.value.trim();
+
+ if (tarea === '') {
+ return;
+ }
+
+ const li = document.createElement('li');
+ li.textContent = tarea;
+ listaTareas.appendChild(li);
+ tareaInput.value = '';
+});
diff --git a/ejercicio2/index.html b/ejercicio2/index.html
index a6d71cf..a53696b 100644
--- a/ejercicio2/index.html
+++ b/ejercicio2/index.html
@@ -2,13 +2,19 @@
-
+
Ejercicio 2
Ejercicio 2
+
+
+
+
+
+
--
2.49.1
From ee4770f32ca54f5a4381a4cddd9b0687d2a57542 Mon Sep 17 00:00:00 2001
From: Sergio Madera De Marco <37299705@terciariourquiza.edu.ar>
Date: Thu, 28 May 2026 13:27:31 -0300
Subject: [PATCH 3/8] ejercicio 3: resaltador de items con delegacion de
eventos
---
ejercicio3/ejercicio3.js | 12 +++++++++++-
ejercicio3/estilo.css | 5 +++++
ejercicio3/index.html | 11 ++++++++++-
3 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/ejercicio3/ejercicio3.js b/ejercicio3/ejercicio3.js
index 6ce9e92..de82d59 100644
--- a/ejercicio3/ejercicio3.js
+++ b/ejercicio3/ejercicio3.js
@@ -1 +1,11 @@
-// Agregar aquí el código javascript
+const listaItems = document.getElementById('lista-items');
+
+listaItems.addEventListener('click', (event) => {
+ const item = event.target;
+
+ if (item.tagName.toLowerCase() !== 'li') {
+ return;
+ }
+
+ item.classList.toggle('seleccionado');
+});
\ No newline at end of file
diff --git a/ejercicio3/estilo.css b/ejercicio3/estilo.css
index 159b7f6..0c7eb9d 100644
--- a/ejercicio3/estilo.css
+++ b/ejercicio3/estilo.css
@@ -1,2 +1,7 @@
/* Agregar el código CSS necesario para el ejercicio */
+.seleccionado {
+ background-color: yellow;
+ font-weight: bold;
+}
+
diff --git a/ejercicio3/index.html b/ejercicio3/index.html
index 678d7ee..1e38784 100644
--- a/ejercicio3/index.html
+++ b/ejercicio3/index.html
@@ -2,13 +2,22 @@
-
+
Ejercicio 3
Ejercicio 3
+
+ - Zapatos nuevos
+ - Leer un capítulo
+ - Comprar frutas
+ - Enviar el informe
+ - Escuchar música
+ - Practicar JavaScript
+
+
--
2.49.1
From 4b110835c79808034ef2efd72d224cb41104e761 Mon Sep 17 00:00:00 2001
From: Sergio Madera De Marco <37299705@terciariourquiza.edu.ar>
Date: Thu, 28 May 2026 13:33:50 -0300
Subject: [PATCH 4/8] ejercicio 4: contador con limite
---
ejercicio4/ejercicio4.js | 30 +++++++++++++++++++++++++++++-
ejercicio4/index.html | 6 +++++-
2 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/ejercicio4/ejercicio4.js b/ejercicio4/ejercicio4.js
index 6ce9e92..d8a9023 100644
--- a/ejercicio4/ejercicio4.js
+++ b/ejercicio4/ejercicio4.js
@@ -1 +1,29 @@
-// Agregar aquí el código javascript
+const restarBtn = document.getElementById('restar');
+const sumarBtn = document.getElementById('sumar');
+const valorSpan = document.getElementById('valor');
+
+let contador = 0;
+const LIMITE_MIN = 0;
+const LIMITE_MAX = 10;
+
+function actualizarEstado() {
+ valorSpan.textContent = contador;
+ restarBtn.disabled = contador <= LIMITE_MIN;
+ sumarBtn.disabled = contador >= LIMITE_MAX;
+}
+
+restarBtn.addEventListener('click', () => {
+ if (contador > LIMITE_MIN) {
+ contador -= 1;
+ actualizarEstado();
+ }
+});
+
+sumarBtn.addEventListener('click', () => {
+ if (contador < LIMITE_MAX) {
+ contador += 1;
+ actualizarEstado();
+ }
+});
+
+actualizarEstado();
diff --git a/ejercicio4/index.html b/ejercicio4/index.html
index f7e70b1..dcac1b6 100644
--- a/ejercicio4/index.html
+++ b/ejercicio4/index.html
@@ -2,13 +2,17 @@
-
+
Ejercicio 4
Ejercicio 4
+
+
+ Contador: 0
+
--
2.49.1
From 6b28028009c6702cfbedcf6d35274502192a3aa2 Mon Sep 17 00:00:00 2001
From: Sergio Madera De Marco <37299705@terciariourquiza.edu.ar>
Date: Thu, 28 May 2026 13:40:59 -0300
Subject: [PATCH 5/8] ejercicio 5: filtro de lista en tiempo real
---
ejercicio5/ejercicio5.js | 44 +++++++++++++++++++++++++++++++++++++++-
ejercicio5/estilo.css | 26 ++++++++++++++++++++++++
ejercicio5/index.html | 7 ++++++-
3 files changed, 75 insertions(+), 2 deletions(-)
diff --git a/ejercicio5/ejercicio5.js b/ejercicio5/ejercicio5.js
index 6ce9e92..13b32d1 100644
--- a/ejercicio5/ejercicio5.js
+++ b/ejercicio5/ejercicio5.js
@@ -1 +1,43 @@
-// Agregar aquí el código javascript
+const paises = [
+ 'Argentina',
+ 'Brasil',
+ 'Canadá',
+ 'Dinamarca',
+ 'España',
+ 'Filipinas',
+ 'Grecia',
+ 'Hungría',
+ 'India',
+ 'Japón',
+ 'México',
+ 'Noruega'
+];
+
+const filtroInput = document.getElementById('filtro');
+const listaPaises = document.getElementById('lista-paises');
+
+function renderizarLista(items) {
+ listaPaises.innerHTML = '';
+
+ items.forEach((pais) => {
+ const li = document.createElement('li');
+ li.textContent = pais;
+ listaPaises.appendChild(li);
+ });
+}
+
+function filtrarPaises(texto) {
+ const valor = texto.trim().toLowerCase();
+ if (valor === '') {
+ return paises;
+ }
+
+ return paises.filter((pais) => pais.toLowerCase().includes(valor));
+}
+
+filtroInput.addEventListener('input', (event) => {
+ const paisesFiltrados = filtrarPaises(event.target.value);
+ renderizarLista(paisesFiltrados);
+});
+
+renderizarLista(paises);
diff --git a/ejercicio5/estilo.css b/ejercicio5/estilo.css
index 159b7f6..94dbdfb 100644
--- a/ejercicio5/estilo.css
+++ b/ejercicio5/estilo.css
@@ -1,2 +1,28 @@
/* Agregar el código CSS necesario para el ejercicio */
+body {
+ font-family: Arial, sans-serif;
+ margin: 20px;
+}
+
+label,
+input {
+ display: block;
+ margin-bottom: 10px;
+}
+
+input {
+ padding: 8px;
+ max-width: 300px;
+}
+
+ul {
+ list-style: disc inside;
+ padding-left: 0;
+ max-width: 320px;
+}
+
+li {
+ margin-bottom: 5px;
+}
+
diff --git a/ejercicio5/index.html b/ejercicio5/index.html
index 51c5f8b..b5bd0cd 100644
--- a/ejercicio5/index.html
+++ b/ejercicio5/index.html
@@ -2,13 +2,18 @@
-
+
Ejercicio 5
Ejercicio 5
+
+
+
+
+
--
2.49.1
From f9f562bf1ca62afb1aef0310457ee04a3f6bf0f5 Mon Sep 17 00:00:00 2001
From: Sergio Madera De Marco <37299705@terciariourquiza.edu.ar>
Date: Thu, 28 May 2026 13:46:22 -0300
Subject: [PATCH 6/8] ejercicio 6: tabla dinamica de empleados
---
ejercicio6/ejercicio6.js | 51 +++++++++++++++++++++++++++++++++++++++-
ejercicio6/estilo.css | 26 ++++++++++++++++++++
ejercicio6/index.html | 14 ++++++++++-
3 files changed, 89 insertions(+), 2 deletions(-)
diff --git a/ejercicio6/ejercicio6.js b/ejercicio6/ejercicio6.js
index 6ce9e92..410d942 100644
--- a/ejercicio6/ejercicio6.js
+++ b/ejercicio6/ejercicio6.js
@@ -1 +1,50 @@
-// Agregar aquí el código javascript
+const empleados = [
+ { nombre: 'Ana', sector: 'Desarrollo', sueldo: 150000 },
+ { nombre: 'Luis', sector: 'Diseño', sueldo: 120000 },
+ { nombre: 'Marta', sector: 'Desarrollo', sueldo: 160000 },
+ { nombre: 'Carlos', sector: 'RRHH', sueldo: 110000 },
+ { nombre: 'Julia', sector: 'Diseño', sueldo: 130000 }
+];
+
+const tablaEmpleados = document.getElementById('tabla-empleados');
+const cuerpoTabla = tablaEmpleados.querySelector('tbody');
+const pieTabla = tablaEmpleados.querySelector('tfoot');
+
+function formatearSueldo(valor) {
+ return `$${valor.toLocaleString('es-AR')}`;
+}
+
+function renderizarTabla() {
+ cuerpoTabla.innerHTML = '';
+ let totalSueldo = 0;
+
+ empleados.forEach((empleado) => {
+ const fila = document.createElement('tr');
+
+ const celdaNombre = document.createElement('td');
+ celdaNombre.textContent = empleado.nombre;
+
+ const celdaSector = document.createElement('td');
+ celdaSector.textContent = empleado.sector;
+
+ const celdaSueldo = document.createElement('td');
+ celdaSueldo.textContent = formatearSueldo(empleado.sueldo);
+
+ fila.appendChild(celdaNombre);
+ fila.appendChild(celdaSector);
+ fila.appendChild(celdaSueldo);
+ cuerpoTabla.appendChild(fila);
+
+ totalSueldo += empleado.sueldo;
+ });
+
+ const promedio = Math.round(totalSueldo / empleados.length);
+ pieTabla.innerHTML = `
+
+ | Sueldo promedio |
+ ${formatearSueldo(promedio)} |
+
+ `;
+}
+
+renderizarTabla();
diff --git a/ejercicio6/estilo.css b/ejercicio6/estilo.css
index 159b7f6..5afaa99 100644
--- a/ejercicio6/estilo.css
+++ b/ejercicio6/estilo.css
@@ -1,2 +1,28 @@
/* Agregar el código CSS necesario para el ejercicio */
+body {
+ font-family: Arial, sans-serif;
+ margin: 20px;
+}
+
+table {
+ border-collapse: collapse;
+ width: 100%;
+ max-width: 600px;
+}
+
+th,
+td {
+ border: 1px solid #ccc;
+ padding: 8px 12px;
+ text-align: left;
+}
+
+th {
+ background-color: #f4f4f4;
+}
+
+tfoot td {
+ background-color: #fafafa;
+}
+
diff --git a/ejercicio6/index.html b/ejercicio6/index.html
index ea1f061..cfa9469 100644
--- a/ejercicio6/index.html
+++ b/ejercicio6/index.html
@@ -2,13 +2,25 @@
-
+
Ejercicio 6
Ejercicio 6
+
+
+
+ | Nombre |
+ Sector |
+ Sueldo |
+
+
+
+
+
+
--
2.49.1
From 909acdf862e3e0d479dc662a642f7edacb33378f Mon Sep 17 00:00:00 2001
From: Sergio Madera De Marco <37299705@terciariourquiza.edu.ar>
Date: Thu, 28 May 2026 13:56:45 -0300
Subject: [PATCH 7/8] ejercicio 8: carrito de compras
---
ejercicio7/ejercicio7.js | 62 +++++++++++++++++++++++++++++++++-
ejercicio7/estilo.css | 40 ++++++++++++++++++++++
ejercicio7/index.html | 26 ++++++++++++++-
ejercicio8/ejercicio8.js | 72 +++++++++++++++++++++++++++++++++++++++-
ejercicio8/index.html | 8 +++++
5 files changed, 205 insertions(+), 3 deletions(-)
diff --git a/ejercicio7/ejercicio7.js b/ejercicio7/ejercicio7.js
index 6ce9e92..4bcfa90 100644
--- a/ejercicio7/ejercicio7.js
+++ b/ejercicio7/ejercicio7.js
@@ -1 +1,61 @@
-// Agregar aquí el código javascript
+const formulario = document.getElementById('formulario');
+const nombreInput = document.getElementById('nombre');
+const edadInput = document.getElementById('edad');
+const contrasenaInput = document.getElementById('contrasena');
+
+const errorNombre = document.getElementById('error-nombre');
+const errorEdad = document.getElementById('error-edad');
+const errorContrasena = document.getElementById('error-contrasena');
+const mensajeExito = document.getElementById('mensaje-exito');
+
+function limpiarErrores() {
+ errorNombre.textContent = '';
+ errorEdad.textContent = '';
+ errorContrasena.textContent = '';
+ mensajeExito.textContent = '';
+}
+
+function validarFormulario() {
+ limpiarErrores();
+
+ let esValido = true;
+ const nombre = nombreInput.value.trim();
+ const edad = edadInput.value.trim();
+ const contrasena = contrasenaInput.value;
+
+ if (nombre === '') {
+ errorNombre.textContent = 'El nombre no puede quedar vacío.';
+ esValido = false;
+ }
+
+ if (edad === '') {
+ errorEdad.textContent = 'La edad no puede quedar vacía.';
+ esValido = false;
+ } else {
+ const edadNumero = Number(edad);
+ if (!Number.isInteger(edadNumero) || edadNumero < 0 || edadNumero > 100) {
+ errorEdad.textContent = 'La edad debe ser un número entero entre 0 y 100.';
+ esValido = false;
+ }
+ }
+
+ if (contrasena === '') {
+ errorContrasena.textContent = 'La contraseña no puede quedar vacía.';
+ esValido = false;
+ } else if (contrasena.length < 8) {
+ errorContrasena.textContent = 'La contraseña debe tener al menos 8 caracteres.';
+ esValido = false;
+ }
+
+ return esValido;
+}
+
+formulario.addEventListener('submit', (event) => {
+ event.preventDefault();
+
+ if (validarFormulario()) {
+ mensajeExito.textContent = 'Formulario enviado correctamente.';
+ } else {
+ mensajeExito.textContent = '';
+ }
+});
diff --git a/ejercicio7/estilo.css b/ejercicio7/estilo.css
index 159b7f6..6d64baa 100644
--- a/ejercicio7/estilo.css
+++ b/ejercicio7/estilo.css
@@ -1,2 +1,42 @@
/* Agregar el código CSS necesario para el ejercicio */
+body {
+ font-family: Arial, sans-serif;
+ margin: 20px;
+}
+
+.campo {
+ margin-bottom: 15px;
+}
+
+label {
+ display: block;
+ margin-bottom: 4px;
+}
+
+input {
+ display: block;
+ width: 100%;
+ max-width: 320px;
+ padding: 8px;
+ box-sizing: border-box;
+}
+
+button {
+ padding: 10px 16px;
+ cursor: pointer;
+}
+
+.error {
+ display: block;
+ margin-top: 4px;
+ color: #c0392b;
+ font-size: 0.95rem;
+}
+
+.exito {
+ margin-top: 16px;
+ color: #2d7a2d;
+ font-weight: bold;
+}
+
diff --git a/ejercicio7/index.html b/ejercicio7/index.html
index 205939a..b1618b4 100644
--- a/ejercicio7/index.html
+++ b/ejercicio7/index.html
@@ -2,13 +2,37 @@
-
+
Ejercicio 7
Ejercicio 7
+
+
+
+
diff --git a/ejercicio8/ejercicio8.js b/ejercicio8/ejercicio8.js
index 6ce9e92..83688e6 100644
--- a/ejercicio8/ejercicio8.js
+++ b/ejercicio8/ejercicio8.js
@@ -1 +1,71 @@
-// Agregar aquí el código javascript
+const productos = [
+ { nombre: "Teclado", precio: 8500 },
+ { nombre: "Mouse", precio: 4200 },
+ { nombre: "Monitor", precio: 62000 },
+ { nombre: "Auriculares", precio: 11000 },
+ { nombre: "Webcam", precio: 15500 }
+];
+
+const contenedorProductos = document.querySelector("#productos");
+const carritoLista = document.querySelector("#carrito");
+const totalTexto = document.querySelector("#total");
+
+const carrito = [];
+
+function mostrarProductos() {
+ for (const producto of productos) {
+ const div = document.createElement("div");
+
+ div.innerHTML = `
+ ${producto.nombre} - $${producto.precio}
+
+ `;
+
+ const boton = div.querySelector("button");
+
+ boton.addEventListener("click", () => {
+ agregarAlCarrito(producto);
+ });
+
+ contenedorProductos.appendChild(div);
+ }
+}
+
+function agregarAlCarrito(producto) {
+ const existente = carrito.find(
+ item => item.nombre === producto.nombre
+ );
+
+ if (existente) {
+ existente.cantidad++;
+ } else {
+ carrito.push({
+ nombre: producto.nombre,
+ precio: producto.precio,
+ cantidad: 1
+ });
+ }
+
+ actualizarCarrito();
+}
+
+function actualizarCarrito() {
+ carritoLista.innerHTML = "";
+
+ let total = 0;
+
+ for (const item of carrito) {
+ const li = document.createElement("li");
+
+ li.textContent =
+ `${item.nombre} x${item.cantidad} - $${item.precio * item.cantidad}`;
+
+ carritoLista.appendChild(li);
+
+ total += item.precio * item.cantidad;
+ }
+
+ totalTexto.textContent = `Total: $${total}`;
+}
+
+mostrarProductos();
diff --git a/ejercicio8/index.html b/ejercicio8/index.html
index ec3d268..fedbf47 100644
--- a/ejercicio8/index.html
+++ b/ejercicio8/index.html
@@ -8,7 +8,15 @@
Ejercicio 8
+Productos
+
+
+Carrito
+
+
+
+Total: $0