Skip to content

Instantly share code, notes, and snippets.

Created December 3, 2015 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/7f3ce3eec437a1927008 to your computer and use it in GitHub Desktop.
Save anonymous/7f3ce3eec437a1927008 to your computer and use it in GitHub Desktop.
http://www.freecodecamp.com/mattnwa 's solution for Bonfire: Falsy Bouncer
// Bonfire: Falsy Bouncer
// Author: @mattnwa
// Challenge: http://www.freecodecamp.com/challenges/bonfire-falsy-bouncer
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function bouncer(arr) {
// Don't show a false ID to this bouncer.
return arr.filter(Boolean);
}
bouncer([7, "ate", "", false, 9]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment