Skip to content

Instantly share code, notes, and snippets.

@rodpoblete
Created June 2, 2017 12:25
Show Gist options
  • Save rodpoblete/08c91fffddca665cf5e7393b5f6cb176 to your computer and use it in GitHub Desktop.
Save rodpoblete/08c91fffddca665cf5e7393b5f6cb176 to your computer and use it in GitHub Desktop.
Eliminar valores no validos de un array - FCC [254]
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