Created
June 2, 2017 12:25
-
-
Save rodpoblete/08c91fffddca665cf5e7393b5f6cb176 to your computer and use it in GitHub Desktop.
Eliminar valores no validos de un array - FCC [254]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function bouncer(arr) { | |
//Solo devuelve los valores evaluados como verdadero dentro del array. | |
return arr.filter(function(value){ | |
if (value){ | |
return (value); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment