From b63299f8e69d2038aff0037608e320b3d5af6c4a Mon Sep 17 00:00:00 2001 From: unknown <28407382@terciariourquiza.edu.ar> Date: Sat, 23 May 2026 23:57:19 -0300 Subject: [PATCH] Ejercicio 3 verificacion de edad con mas detalle reciclando variables --- ejercicios.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/ejercicios.js b/ejercicios.js index a5d9efa..6d3b0fa 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -3,13 +3,24 @@ console.log("Archivo vinculado exitosamente"); // Resolver acá los ejercicios propuestos. +// ejercicio 2 let nombre = "Juan"; let edad = 25; -function verificacion() { +function verificacion2() { if (edad < 18) { console.log(`${nombre} es menor de edad`); } else { console.log(`${nombre} es mayor de edad`); } } -verificacion(); \ No newline at end of file +verificacion2(); +// ejercicio 3 +function verificacion3() { + if (edad < 13) { + console.log(`${nombre} esta en su infancia`); + } else if (edad < 17) { + console.log(`${nombre} esta en su adolecencia`); + } else { + console.log(`${nombre} esta en su adultez`);} +} +verificacion3() \ No newline at end of file