Created
December 8, 2015 03:06
-
-
Save anonymous/a442aac223e7d5926eac to your computer and use it in GitHub Desktop.
http://www.freecodecamp.com/robertsheacole 's solution for Bonfire: Falsy Bouncer
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
// 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