Skip to content

Instantly share code, notes, and snippets.

@jrjames83
Forked from anonymous/bonfire-falsy-bouncer#.js
Created December 6, 2015 22:03
Show Gist options
  • Save jrjames83/230689bdd0c993f4f035 to your computer and use it in GitHub Desktop.
Save jrjames83/230689bdd0c993f4f035 to your computer and use it in GitHub Desktop.
http://www.freecodecamp.com/fcc0208647c 's solution for Bonfire: Falsy Bouncer
// Bonfire: Falsy Bouncer
// Author: @fcc0208647c
// Challenge: http://www.freecodecamp.com/challenges/bonfire-falsy-bouncer#
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function bouncer(arr) {
trues = arr.filter(Boolean);
return trues;
}
bouncer([7, "ate", "", false, 9]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment