From 44327abb64a33f126bdb93f054f69ea6206e0263 Mon Sep 17 00:00:00 2001 From: Geronimo Hidalgo <45217034@terciariourquiza.edu.ar> Date: Wed, 20 May 2026 14:53:45 -0300 Subject: [PATCH 1/8] feat(javascript): add a script file to html --- index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/index.html b/index.html index b1c7d4f..c766e14 100644 --- a/index.html +++ b/index.html @@ -12,4 +12,5 @@ + -- 2.49.1 From 1815a90c341a057435e383d0e2a516ef4cac104c Mon Sep 17 00:00:00 2001 From: Geronimo Hidalgo <45217034@terciariourquiza.edu.ar> Date: Wed, 20 May 2026 15:12:12 -0300 Subject: [PATCH 2/8] feat: add conditional block for age checking --- ejercicios.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ejercicios.js b/ejercicios.js index 8e69ac3..eed7125 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -3,3 +3,15 @@ console.log("Archivo vinculado exitosamente"); // Resolver acá los ejercicios propuestos. + +// Primer ejercicio + + +const name = "Geronimo" +const age = 22 + +if (age >= 18) { + console.log(name +" es mayor de edad"); +} else { + console.log(name +" es menor de edad"); +} -- 2.49.1 From a181ee8682202bbbfa0c981a40028c163656c1ca Mon Sep 17 00:00:00 2001 From: Geronimo Hidalgo <45217034@terciariourquiza.edu.ar> Date: Wed, 20 May 2026 15:26:50 -0300 Subject: [PATCH 3/8] feat: add conditional for classify age into child, adult and teen --- ejercicios.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ejercicios.js b/ejercicios.js index eed7125..1bf4e8e 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -15,3 +15,13 @@ if (age >= 18) { } else { console.log(name +" es menor de edad"); } + +// Segundo ejercicio + +if (age <13 ) { + console.log(name +" es un infante"); +} else if (age >=18 ) { + console.log(name +" es un adulto"); +} else { + console.log(name +" es un adolescente"); +} -- 2.49.1 From cc4c171446cd8ebf6e24cfbabc62499eec611964 Mon Sep 17 00:00:00 2001 From: Geronimo Hidalgo <45217034@terciariourquiza.edu.ar> Date: Wed, 20 May 2026 16:54:37 -0300 Subject: [PATCH 4/8] feat: add while to show 3 multiples --- ejercicios.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ejercicios.js b/ejercicios.js index 1bf4e8e..8a9a4cd 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -25,3 +25,13 @@ if (age <13 ) { } else { console.log(name +" es un adolescente"); } + +// Tercer ejercicio + +let n=3 +const maximo=30 + +while (n < maximo) { + console.log(n) + n+=3 +} -- 2.49.1 From 9de15985f45c79a7024d01fa97a9fbd2ee41df7b Mon Sep 17 00:00:00 2001 From: Geronimo Hidalgo <45217034@terciariourquiza.edu.ar> Date: Wed, 20 May 2026 17:06:28 -0300 Subject: [PATCH 5/8] feat: add for to show 3 multiples --- ejercicios.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ejercicios.js b/ejercicios.js index 8a9a4cd..be41940 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -35,3 +35,9 @@ while (n < maximo) { console.log(n) n+=3 } + +// Cuarto ejercicio + +for (let i=3; i < maximo; i+=3){ + console.log(i) +} -- 2.49.1 From 03a14f21b2aa919048e07b0576738eab96909d77 Mon Sep 17 00:00:00 2001 From: Geronimo Hidalgo <45217034@terciariourquiza.edu.ar> Date: Wed, 20 May 2026 17:16:30 -0300 Subject: [PATCH 6/8] feat: add for of frutas --- ejercicios.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ejercicios.js b/ejercicios.js index be41940..60a8866 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -6,7 +6,6 @@ console.log("Archivo vinculado exitosamente"); // Primer ejercicio - const name = "Geronimo" const age = 22 @@ -41,3 +40,11 @@ while (n < maximo) { for (let i=3; i < maximo; i+=3){ console.log(i) } + +// Quinto ejercico + +const frutas=["manzana","kiwi","frutilla"] +for (const fruta of frutas){ + console.log(fruta); +} + -- 2.49.1 From 5a9719891299fa007a54a829464286a57091a192 Mon Sep 17 00:00:00 2001 From: Geronimo Hidalgo <45217034@terciariourquiza.edu.ar> Date: Wed, 20 May 2026 17:31:59 -0300 Subject: [PATCH 7/8] feat: add function for presentation --- ejercicios.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ejercicios.js b/ejercicios.js index 60a8866..567b4e4 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -48,3 +48,11 @@ for (const fruta of frutas){ console.log(fruta); } +// Sexto ejercicio + +function presentation(name,age){ + const p = `Hola mi nombre es ${name} y mi edad es ${age}`; + return p +} + +console.log(presentation(name,age)); -- 2.49.1 From bf06375ab8a29bbf00f0d0ae8dbefdc391147bca Mon Sep 17 00:00:00 2001 From: Geronimo Hidalgo <45217034@terciariourquiza.edu.ar> Date: Wed, 20 May 2026 18:15:15 -0300 Subject: [PATCH 8/8] feat: add function for numbers max,min and average --- ejercicios.js | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/ejercicios.js b/ejercicios.js index 567b4e4..949ca0d 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -56,3 +56,41 @@ function presentation(name,age){ } console.log(presentation(name,age)); + +// Septimo ejercicio + +const numbers = [ 1, 5, 10, 16, 32, 58] + +function numeroMaximo(array){ + let max = array[0]; + for(const num of array){ + if(num > max){ + max = num; + } + + } + return max; +} +console.log(`El valor maximo es ${numeroMaximo(numbers)}`); + +function numeroMinimo(array){ + let min = array[0]; + for(const num of array){ + if(num < min){ + min = num; + } + } + return min; +} +console.log(`El valor minimo es ${numeroMinimo(numbers)}`); + +function numeroPromedio(array){ + let sum = 0; + let cantidad = 0; + for(const num of array){ + sum+=num + cantidad++ + } + return (sum/cantidad) +} +console.log(`El promedio es ${numeroPromedio(numbers)}`); \ No newline at end of file -- 2.49.1