From dbee393d0d937faa0c6535a46eb92262f68fd0f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Blas=20Alarc=C3=B3n?= <47840816@terciariourquiza.edu.ar> Date: Mon, 4 May 2026 17:21:33 -0300 Subject: [PATCH 1/8] Vincule el ejercicios.js al archivo index.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 7b62ee31a38adb992b22bc6e1fdd665ffa43eff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Blas=20Alarc=C3=B3n?= <47840816@terciariourquiza.edu.ar> Date: Mon, 4 May 2026 17:45:42 -0300 Subject: [PATCH 2/8] Declare las variables y los indique en la consola --- ejercicios.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ejercicios.js b/ejercicios.js index 8e69ac3..bfc28d5 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -3,3 +3,12 @@ console.log("Archivo vinculado exitosamente"); // Resolver acá los ejercicios propuestos. + +const nombre = "Blas"; +let edad = "18" + +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 db111b89e4576e4714df994f71dba3a3ea3eb15a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Blas=20Alarc=C3=B3n?= <47840816@terciariourquiza.edu.ar> Date: Mon, 4 May 2026 17:57:50 -0300 Subject: [PATCH 3/8] Repeti el ejercicio anterior agregando si esta en su infancia, adolescencia, o adultez --- ejercicios.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ejercicios.js b/ejercicios.js index bfc28d5..bd011a3 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -11,4 +11,12 @@ if (edad >= 18) { console.log(`${nombre} es mayor de edad`); } else { console.log(`${nombre} es menor de edad`); +} + +if (edad < 13) { + console.log(`${nombre} esta en su infancia`) +} else if (edad >= 13 & edad <18) { + console.log(`${nombre} esta en su adolescencia`) +} else { + console.log(`${nombre} esta en su adultez`) } \ No newline at end of file -- 2.49.1 From 5693e5c01bd32c570df579fa9f3d16da59f8985a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Blas=20Alarc=C3=B3n?= <47840816@terciariourquiza.edu.ar> Date: Mon, 4 May 2026 18:08:44 -0300 Subject: [PATCH 4/8] Agregue la variable maximo para mostrar todos los multiplos de 3 menores que el maximo, utilizando un while --- ejercicios.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ejercicios.js b/ejercicios.js index bd011a3..169a096 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -19,4 +19,11 @@ if (edad < 13) { console.log(`${nombre} esta en su adolescencia`) } else { console.log(`${nombre} esta en su adultez`) +} + +let maximo = 15; +let contador = 3; +while (contador < maximo) { + console.log(contador); + (contador = contador + 3); } \ No newline at end of file -- 2.49.1 From 9cb357e37ee3c5f4e384f7aec6e7f2141ca99d50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Blas=20Alarc=C3=B3n?= <47840816@terciariourquiza.edu.ar> Date: Mon, 4 May 2026 18:14:28 -0300 Subject: [PATCH 5/8] Repeti el ejercicio anterior pero usando un blucle for --- ejercicios.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ejercicios.js b/ejercicios.js index 169a096..27a7340 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -26,4 +26,8 @@ let contador = 3; while (contador < maximo) { console.log(contador); (contador = contador + 3); +} + +for (let contador = 3; contador < maximo; contador += 3) { + console.log(contador); } \ No newline at end of file -- 2.49.1 From b1a7380591fc0e5d0aea23a933494640dc59f6aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Blas=20Alarc=C3=B3n?= <47840816@terciariourquiza.edu.ar> Date: Mon, 4 May 2026 18:18:51 -0300 Subject: [PATCH 6/8] cree un array con mis frutas favoritas y lo recorri con un for mostrando cada fruta en consola --- ejercicios.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ejercicios.js b/ejercicios.js index 27a7340..550d823 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -30,4 +30,9 @@ while (contador < maximo) { for (let contador = 3; contador < maximo; contador += 3) { console.log(contador); +} + +const frutas = ["manzana", "banana", "uva"]; +for (const fruta of frutas) { + console.log(fruta); } \ No newline at end of file -- 2.49.1 From b4f99db31eabf802f77e7cb8788103fcc44b1066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Blas=20Alarc=C3=B3n?= <47840816@terciariourquiza.edu.ar> Date: Mon, 4 May 2026 18:39:39 -0300 Subject: [PATCH 7/8] Agregue la funcion presentarse --- ejercicios.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ejercicios.js b/ejercicios.js index 550d823..8c1cab1 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -35,4 +35,10 @@ for (let contador = 3; contador < maximo; contador += 3) { const frutas = ["manzana", "banana", "uva"]; 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("Blas", 18)); \ No newline at end of file -- 2.49.1 From 82ba62888989d628be34a5a0cb09feb53a3e1742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Blas=20Alarc=C3=B3n?= <47840816@terciariourquiza.edu.ar> Date: Mon, 4 May 2026 19:30:28 -0300 Subject: [PATCH 8/8] Cree un array y agregue las 3 funciones de minimo, maximo y promedio --- ejercicios.js | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/ejercicios.js b/ejercicios.js index 8c1cab1..f08f692 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -41,4 +41,49 @@ function presentarse(nombre, edad) { return `Me llamo ${nombre} y tengo ${edad} años.` } -console.log(presentarse("Blas", 18)); \ No newline at end of file +console.log(presentarse("Blas", 18)); + +const numeros = [ 1, 3, 8, 2, 18, 6 ]; +function Max() { + let maximo = numeros[0]; + let contador = 1; + + while (contador < 6) { + if (numeros[contador] > maximo) { + maximo = numeros[contador]; + } + contador++; + } + + return maximo; +} + +function Min() { + let minimo = numeros[0]; + let contador = 1; + + while (contador < 6) { + if (numeros[contador] < minimo) { + minimo = numeros[contador]; + } + contador++; + } + + return minimo; +} + +function Promedio() { + let suma = 0; + let contador = 0; + + while (contador < 6) { + suma += numeros[contador]; + contador++; + } + + return suma / contador; +} + +console.log("Maximo:", Max()); +console.log("Minimo:", Min()); +console.log("Promedio:", Promedio()); \ No newline at end of file -- 2.49.1