From e4b1549105ea58300d99017af1211c1ec8fefe79 Mon Sep 17 00:00:00 2001 From: Bruno Date: Thu, 30 Apr 2026 22:31:08 -0300 Subject: [PATCH] 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