From a81741186bf5e628ce3426bd4d9bbbbf6b4c228a Mon Sep 17 00:00:00 2001 From: Fmachado <89491149+pepemazter@users.noreply.github.com> Date: Wed, 23 Aug 2023 13:21:46 -0300 Subject: [PATCH] Update 01.js --- 01.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/01.js b/01.js index 833ee450..3d7eb02f 100644 --- a/01.js +++ b/01.js @@ -11,10 +11,16 @@ function soloNumeros(array) { // soloNumeros([1, 'Henry', 2]) debe retornar [1, 2] // Tu código aca: - +var numeros = [] + for ( var i=0 ; i < array.length; i++){ + if (typeof array[i] === 'number'){ + numeros.push(array[i]); + } + } + return numeros } // No modifiques nada debajo de esta linea // -module.exports = soloNumeros \ No newline at end of file +module.exports = soloNumeros