Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robertsheacole/f376ac46bad94c7acb85 to your computer and use it in GitHub Desktop.
Save robertsheacole/f376ac46bad94c7acb85 to your computer and use it in GitHub Desktop.
http://www.freecodecamp.com/robertsheacole 's solution for Bonfire: Falsy Bouncer
// Bonfire: Falsy Bouncer
// Author: @robertsheacole
// Challenge: http://www.freecodecamp.com/challenges/bonfire-falsy-bouncer#
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function bouncer(arr) {
function deleteFalsey(arr){
return Boolean(arr);
}
var placeholderArray = arr.filter(deleteFalsey);
return placeholderArray;
}
bouncer([7, "ate", "", false, 9]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment