From cbee53ed77ea4f7b59891462bdfa1f7f2d81fd64 Mon Sep 17 00:00:00 2001 From: Nicolas Murua Date: Thu, 7 May 2026 23:26:18 -0300 Subject: [PATCH] ejercicio 8 --- ejercicios.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ejercicios.js b/ejercicios.js index 0a1afc7..ce702e7 100644 --- a/ejercicios.js +++ b/ejercicios.js @@ -181,3 +181,13 @@ const sumarDiez = crearSumador(10); console.log(sumarDiez(5)); // 15 console.log(sumarDiez(20)); // 30 */ + +function crearSumador(num){ + return function(number){ + return num + number; + } +} + +const sumador = crearSumador(10); +console.log(sumador(10)); +console.log(sumador(3));