From b08e3a97df6d6cdabbd7cc29bde14d484633c532 Mon Sep 17 00:00:00 2001 From: Lucio Gaibazzi Date: Sun, 3 May 2026 18:39:05 -0300 Subject: [PATCH 1/8] Se pudo vincular exitosamente el archivo ejercicios.js en el archivo html --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index b1c7d4f..26d1243 100644 --- a/index.html +++ b/index.html @@ -10,6 +10,6 @@

Vincular el archivo ejercicios.js a este archivo. Luego, resolver ahí los ejercicios.

- + -- 2.49.1 From 4882b07903df10885b030cb373c63b5b13a8f188 Mon Sep 17 00:00:00 2001 From: Lucio Gaibazzi Date: Sun, 3 May 2026 19:53:33 -0300 Subject: [PATCH 2/8] Realizo el ejercicio 2 de la clase 6 --- ejercicios.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ejercicios.js b/ejercicios.js index 8e69ac3..1d7dcf2 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -3,3 +3,15 @@ console.log("Archivo vinculado exitosamente"); // Resolver acá los ejercicios propuestos. + +let nombre = "Lucho"; +console.log(`Hola, ${nombre}!`); +let edad = 21; + +if (edad >= 18) { + console.log("Lucho es mayor de edad"); +} + +else { + console.log("Lucho es menor de edad"); +} \ No newline at end of file -- 2.49.1 From 26aabacf986c7d27eeef29dbfa9b69382e7570e3 Mon Sep 17 00:00:00 2001 From: Lucio Gaibazzi Date: Sun, 3 May 2026 20:13:02 -0300 Subject: [PATCH 3/8] Realizo el ejercicio 3 de la clase 6 --- ejercicios.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ejercicios.js b/ejercicios.js index 1d7dcf2..39fd1d9 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -8,10 +8,14 @@ let nombre = "Lucho"; console.log(`Hola, ${nombre}!`); let edad = 21; -if (edad >= 18) { - console.log("Lucho es mayor de edad"); +if (edad < 13) { + console.log("Lucho está en la infancia"); +} + +else if (edad >= 13 && edad <= 17) { + console.log("Lucho está en la adolescencia"); } else { - console.log("Lucho es menor de edad"); + console.log("Lucho está en la adultez"); } \ No newline at end of file -- 2.49.1 From 2e70813d3083356a54620e4bf5be4a960e6f4431 Mon Sep 17 00:00:00 2001 From: Lucio Gaibazzi Date: Sun, 3 May 2026 21:25:50 -0300 Subject: [PATCH 4/8] Realizo el ejercicio 4 de la clase 6 --- ejercicios.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ejercicios.js b/ejercicios.js index 39fd1d9..6c1025b 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -18,4 +18,12 @@ else if (edad >= 13 && edad <= 17) { else { console.log("Lucho está en la adultez"); +} + + +let maximo = 15; +let contador = 3; +while (contador < 15) { + console.log(contador); + contador = contador + 3; } \ No newline at end of file -- 2.49.1 From 059809462e9ff81d9dce72f7d4687d21156901a9 Mon Sep 17 00:00:00 2001 From: Lucio Gaibazzi Date: Sun, 3 May 2026 21:50:05 -0300 Subject: [PATCH 5/8] Realizo el ejercicio 5 de la clase 6 --- ejercicios.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ejercicios.js b/ejercicios.js index 6c1025b..47a79dd 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -22,8 +22,7 @@ else { let maximo = 15; -let contador = 3; -while (contador < 15) { - console.log(contador); - contador = contador + 3; + +for (let i = 3; i < maximo; i = (i+3)) { + console.log(i); } \ No newline at end of file -- 2.49.1 From 0eeb6f95f394571f5f38daed0aae6fa9129ecb51 Mon Sep 17 00:00:00 2001 From: Lucio Gaibazzi Date: Sun, 3 May 2026 22:05:26 -0300 Subject: [PATCH 6/8] Realizo el ejercicio 6 de la clase 6 --- ejercicios.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ejercicios.js b/ejercicios.js index 47a79dd..e48476b 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -25,4 +25,10 @@ let maximo = 15; for (let i = 3; i < maximo; i = (i+3)) { console.log(i); +} + + +const frutas = ["banana", "durazno", "manzana"]; +for (const fruta of frutas) { + console.log(fruta) } \ No newline at end of file -- 2.49.1 From dc1e232e6b6ae72c057e8a14897c494205602af5 Mon Sep 17 00:00:00 2001 From: Lucio Gaibazzi Date: Mon, 4 May 2026 17:41:07 -0300 Subject: [PATCH 7/8] Realizo el ejercicio 7 de la clase 6 --- ejercicios.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ejercicios.js b/ejercicios.js index e48476b..72e9617 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -31,4 +31,12 @@ for (let i = 3; i < maximo; i = (i+3)) { const frutas = ["banana", "durazno", "manzana"]; for (const fruta of frutas) { console.log(fruta) -} \ No newline at end of file +} + + + +function presentarse(nombre, edad) { + return `Me llamo ${nombre} y tengo ${edad} años`; +} + +console.log(presentarse("Lucho", 21)); \ No newline at end of file -- 2.49.1 From 5c200b3719a4405937f1e46cc4bf4bd2d6167570 Mon Sep 17 00:00:00 2001 From: Lucio Gaibazzi Date: Mon, 4 May 2026 18:30:30 -0300 Subject: [PATCH 8/8] Realizo el ejercicio 8 de la clase 6 --- ejercicios.js | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/ejercicios.js b/ejercicios.js index 72e9617..909d929 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -39,4 +39,53 @@ function presentarse(nombre, edad) { return `Me llamo ${nombre} y tengo ${edad} años`; } -console.log(presentarse("Lucho", 21)); \ No newline at end of file +console.log(presentarse("Lucho", 21)); + + + +const numeros = [1, 3, 8, 2, 18, 6] + +function valormaximo(valormax) { + let max = valormax[0]; + + for (const num of valormax) { + if (num > max) { + max = num; + } + } + + return max; +} + +console.log("Máximo:", valormaximo(numeros)); + + +function valorminimo(valormin) { + let min = valormin[0]; + + for (const num of valormin) { + if (num < min) { + min = num; + } + } + + return min; +} + +console.log("Mínimo:", valorminimo(numeros)); + + + +function valorpromedio(promedio) { + let suma = 0; + let contador = 0; + + for (const num of promedio) { + suma = (suma + num); + contador = (contador + 1); + } + + return suma / contador; +} + +console.log("Promedio:", valorpromedio(numeros)); \ No newline at end of file -- 2.49.1