From 217ec5332ba2bcad067db77d80bc0651142cd354 Mon Sep 17 00:00:00 2001 From: Bruno Date: Thu, 30 Apr 2026 22:03:28 -0300 Subject: [PATCH 1/8] Resolucion hasta el ejercicio nro 2 --- ejercicios.js | 8 ++++++++ index.html | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ejercicios.js b/ejercicios.js index 8e69ac3..192ba59 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -3,3 +3,11 @@ console.log("Archivo vinculado exitosamente"); // Resolver acá los ejercicios propuestos. +let nombre = "Bruno" +let edad = 20 + +if (edad >= 18) { + console.log(`Hola, ${nombre}! eres mayor de edad`); +} else { +console.log(`Hola ${nombre}! eres menor de edad`); +} \ No newline at end of file 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 bd220aed000182561abc27cb5f22a46f7c3e834c Mon Sep 17 00:00:00 2001 From: Bruno Date: Thu, 30 Apr 2026 22:05:23 -0300 Subject: [PATCH 2/8] Resolucion del 3er ejercicio --- ejercicios.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ejercicios.js b/ejercicios.js index 192ba59..aacffea 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -10,4 +10,12 @@ if (edad >= 18) { console.log(`Hola, ${nombre}! eres mayor de edad`); } else { console.log(`Hola ${nombre}! eres menor de edad`); +} + +if (edad < 13) { + console.log("Estas en tu infancia"); +} else if (edad >13 && edad < 17) { + console.log("Estas en tu adolescencia"); +} else { + console.log("Estas en tu adultez"); } \ No newline at end of file -- 2.49.1 From 085cd5702b1973eea9a1418af67111459fcbf280 Mon Sep 17 00:00:00 2001 From: Bruno Date: Thu, 30 Apr 2026 22:06:32 -0300 Subject: [PATCH 3/8] Resolucion del 4to ejercicio --- ejercicios.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ejercicios.js b/ejercicios.js index aacffea..9efd6a3 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -18,4 +18,12 @@ if (edad < 13) { console.log("Estas en tu adolescencia"); } else { console.log("Estas en tu adultez"); +} + +let maximo = 15 +let inicio = 3 + +while (inicio < maximo) { + console.log(inicio); + inicio = inicio + 3 } \ No newline at end of file -- 2.49.1 From 8cce3bad3dcb11618e03bac6df4681559ae42c50 Mon Sep 17 00:00:00 2001 From: Bruno Date: Thu, 30 Apr 2026 22:07:19 -0300 Subject: [PATCH 4/8] Resolucion del 5to ejercicio --- ejercicios.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ejercicios.js b/ejercicios.js index 9efd6a3..63984f4 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -26,4 +26,10 @@ let inicio = 3 while (inicio < maximo) { console.log(inicio); inicio = inicio + 3 +} + +maximo = 45 + +for (let numero = 3; numero < maximo; numero = numero + 3) { + console.log(numero); } \ No newline at end of file -- 2.49.1 From 87d93deefbbdd071d7ec72b243622ddb9c809ec8 Mon Sep 17 00:00:00 2001 From: Bruno Date: Thu, 30 Apr 2026 22:08:08 -0300 Subject: [PATCH 5/8] Resolucion del 6to ejercicio --- ejercicios.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ejercicios.js b/ejercicios.js index 63984f4..c32a8ab 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -32,4 +32,9 @@ maximo = 45 for (let numero = 3; numero < maximo; numero = numero + 3) { console.log(numero); +} + +const frutas = ["sandia", "kiwi", "manzana"]; +for(const fruta of frutas) { + console.log(fruta) } \ No newline at end of file -- 2.49.1 From 8d5f7f308a30f1880da567925a9c5130308f1e90 Mon Sep 17 00:00:00 2001 From: Bruno Date: Thu, 30 Apr 2026 22:14:10 -0300 Subject: [PATCH 6/8] Resolucion del 7mo ejercicio --- ejercicios.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ejercicios.js b/ejercicios.js index c32a8ab..f0b5ab4 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -37,4 +37,9 @@ for (let numero = 3; numero < maximo; numero = numero + 3) { const frutas = ["sandia", "kiwi", "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(nombre, edad)) \ No newline at end of file -- 2.49.1 From e4b1549105ea58300d99017af1211c1ec8fefe79 Mon Sep 17 00:00:00 2001 From: Bruno Date: Thu, 30 Apr 2026 22:31:08 -0300 Subject: [PATCH 7/8] Resolucion de la mitad del ultimo ejercicio --- ejercicios.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/ejercicios.js b/ejercicios.js index f0b5ab4..d84faeb 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -36,10 +36,22 @@ for (let numero = 3; numero < maximo; numero = numero + 3) { const frutas = ["sandia", "kiwi", "manzana"]; for(const fruta of frutas) { - console.log(fruta) + console.log(fruta); } function presentarse(nombre, edad) { - return(`Me llamo ${nombre} y tengo ${edad} años.`) + return(`Me llamo ${nombre} y tengo ${edad} años.`); +} +console.log(presentarse(nombre, edad)); + +const numeros = [1, 3, 8, 2, 18, 6]; +function Vmaximo(numeros) { + let max = -1; + for (const n of numeros) { + if (max < n) { + max = n; + } + } + return max; + } -console.log(presentarse(nombre, edad)) \ No newline at end of file -- 2.49.1 From cac83e42b00a8df3eb207492be1375bf5d09041f Mon Sep 17 00:00:00 2001 From: Bruno Date: Mon, 4 May 2026 17:49:34 -0300 Subject: [PATCH 8/8] Resolucion del ultimo ejercicio --- ejercicios.js | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/ejercicios.js b/ejercicios.js index d84faeb..6799773 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -45,6 +45,7 @@ function presentarse(nombre, edad) { console.log(presentarse(nombre, edad)); const numeros = [1, 3, 8, 2, 18, 6]; + function Vmaximo(numeros) { let max = -1; for (const n of numeros) { @@ -53,5 +54,26 @@ function Vmaximo(numeros) { } } return max; - } +console.log(Vmaximo(numeros)) + +function Vminimo(numeros) { + let min = 1000; + for (const n of numeros) { + if (min > n) { + min = n; + } + } + return min; +} +console.log(Vminimo(numeros)) + +function promedio(numeros) { + let suma = 0; + for (const n of numeros) { + suma = suma + n; + } + let resultado = suma / numeros.length; + return resultado; +} +console.log(promedio(numeros)) \ No newline at end of file -- 2.49.1