From d8fcb3633064c6c8ff6f4a67d861266ce3c4f3d3 Mon Sep 17 00:00:00 2001 From: Santi <38596280@terciariourquiza.edu.ar> Date: Thu, 30 Apr 2026 11:07:08 -0300 Subject: [PATCH 1/8] Vincular los archivos html y js --- index.html | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/index.html b/index.html index b1c7d4f..4dc090d 100644 --- a/index.html +++ b/index.html @@ -1,15 +1,17 @@ - + -
- - -Vincular el archivo ejercicios.js a este archivo. Luego, resolver ahí - los ejercicios.
+ + + ++ Vincular el archivo ejercicios.js a este archivo. Luego, resolver ahí los + ejercicios. +
- - + + -- 2.49.1 From be5a18576c93b169d285da8e0cbd3ed48ef00678 Mon Sep 17 00:00:00 2001 From: Santi <38596280@terciariourquiza.edu.ar> Date: Thu, 30 Apr 2026 15:55:40 -0300 Subject: [PATCH 2/8] Ejercicio 2 completado --- ejercicios.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ejercicios.js b/ejercicios.js index 8e69ac3..1ed2e2b 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -3,3 +3,11 @@ console.log("Archivo vinculado exitosamente"); // Resolver acá los ejercicios propuestos. +let nombre = "Alejo" +let edad = 20 + +if (edad >= 18) { + console.log(`${nombre} es mayor de edad`); +} else { + console.log(`${nombre} es menor de edad`) +} \ No newline at end of file -- 2.49.1 From 34b21ca4f2ced90f0e023b31a88de3ecf858fb86 Mon Sep 17 00:00:00 2001 From: Santi <38596280@terciariourquiza.edu.ar> Date: Thu, 30 Apr 2026 15:57:30 -0300 Subject: [PATCH 3/8] Ejercicio 3 completado --- ejercicios.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ejercicios.js b/ejercicios.js index 1ed2e2b..f8f01d1 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -6,8 +6,10 @@ console.log("Archivo vinculado exitosamente"); let nombre = "Alejo" let edad = 20 -if (edad >= 18) { - console.log(`${nombre} es mayor de edad`); +if (edad < 13) { + console.log(nombre + " está en su infancia"); +} else if (edad >= 13 && edad <= 17) { + console.log(nombre + " está en su adolescencia"); } else { - console.log(`${nombre} es menor de edad`) + console.log(nombre + " está en su adultez"); } \ No newline at end of file -- 2.49.1 From 3414f6c83d81b0a9d292dee3c13351b3e8acb737 Mon Sep 17 00:00:00 2001 From: Santi <38596280@terciariourquiza.edu.ar> Date: Thu, 30 Apr 2026 16:01:57 -0300 Subject: [PATCH 4/8] Ejercicio 4 completado --- ejercicios.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ejercicios.js b/ejercicios.js index f8f01d1..cd33bde 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -3,6 +3,7 @@ console.log("Archivo vinculado exitosamente"); // Resolver acá los ejercicios propuestos. +/* let nombre = "Alejo" let edad = 20 @@ -12,4 +13,11 @@ if (edad < 13) { console.log(nombre + " está en su adolescencia"); } else { console.log(nombre + " está en su adultez"); +} */ + +let maximo = 15; +let i = 3; +while (i < maximo) { + console.log(i); + i = i + 3; } \ No newline at end of file -- 2.49.1 From 1fe944c34c4c4048a6fc25a649d6ae23239aadef Mon Sep 17 00:00:00 2001 From: Santi <38596280@terciariourquiza.edu.ar> Date: Thu, 30 Apr 2026 16:04:37 -0300 Subject: [PATCH 5/8] Ejericio 5 completado --- ejercicios.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ejercicios.js b/ejercicios.js index cd33bde..763a4a7 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -20,4 +20,9 @@ let i = 3; while (i < maximo) { console.log(i); i = i + 3; +} + +let maximo = 15 +for (let i=3; i < maximo;i = i+3){ + console.log(i); } \ No newline at end of file -- 2.49.1 From d95a8ac7b28707f80d4a9f1ee49c1f44eadd75e6 Mon Sep 17 00:00:00 2001 From: Santi <38596280@terciariourquiza.edu.ar> Date: Thu, 30 Apr 2026 16:06:32 -0300 Subject: [PATCH 6/8] Ejercicio 5 completado --- ejercicios.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ejercicios.js b/ejercicios.js index 763a4a7..352eaf3 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -25,4 +25,9 @@ while (i < maximo) { let maximo = 15 for (let i=3; i < maximo;i = i+3){ console.log(i); +} + +let frutas = ["Manzana", "Banana", "Frutilla"]; +for (let fruta of frutas) { + console.log(fruta); } \ No newline at end of file -- 2.49.1 From 2e4252f5ad25c17103127d34d6d4eb8adf1c46b4 Mon Sep 17 00:00:00 2001 From: Santi <38596280@terciariourquiza.edu.ar> Date: Thu, 30 Apr 2026 16:11:51 -0300 Subject: [PATCH 7/8] Ejercicio 7 completado --- ejercicios.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ejercicios.js b/ejercicios.js index 352eaf3..8e1c5d1 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -30,4 +30,9 @@ for (let i=3; i < maximo;i = i+3){ let frutas = ["Manzana", "Banana", "Frutilla"]; for (let 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("Alejo",20)) \ No newline at end of file -- 2.49.1 From 9ffac161b274d188a79d2f1f2dc059f799e951c5 Mon Sep 17 00:00:00 2001 From: Santi <38596280@terciariourquiza.edu.ar> Date: Thu, 30 Apr 2026 16:27:11 -0300 Subject: [PATCH 8/8] Ejercicio 8 completado --- ejercicios.js | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/ejercicios.js b/ejercicios.js index 8e1c5d1..cda6d7c 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -22,7 +22,7 @@ while (i < maximo) { i = i + 3; } -let maximo = 15 + for (let i=3; i < maximo;i = i+3){ console.log(i); } @@ -35,4 +35,35 @@ for (let fruta of frutas) { function presentarse(nombre, edad){ return ("me llamo "+nombre+" y tengo "+ edad+ " años.") } -console.log(presentarse("Alejo",20)) \ No newline at end of file +console.log(presentarse("Alejo",20)) + + +const numeros = [1, 3, 8, 2, 18, 6]; + +function obtenerMaximo(numeros) { + let maximo = numeros[0]; + for (let i = 0; i < numeros.length; i++) { + if (numeros[i] > maximo) { + maximo = numeros[i]; + } + } + return maximo; +} + +function obtenerMinimo(numeros) { + let minimo = numeros[0]; + for (let i = 0; i < numeros.length; i++) { + if (numeros[i] < minimo) { + minimo = numeros[i] + } + } + return minimo +} + +function obtenerPromedio(numeros) { + let suma = 0; + for (let i = 0; i < numeros.length; i++) { + suma = suma + numeros[i]; + } + return suma / numeros.length; +} \ No newline at end of file -- 2.49.1