# JavaScript algorithm challenge: Falsy bouncers

**URL:** <https://forum.freecodecamp.org/t/javascript-algorithm-challenge-falsy-bouncers/134829>\
**Category:** General\
**Created:** [July 8, 2017, 10:08am UTC](https://forum.freecodecamp.org/t/javascript-algorithm-challenge-falsy-bouncers/134829 "2017-07-08T10:08:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![OriginalNameOriginsO](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/originalnameoriginso/32/65288_2.png) [@OriginalNameOriginsO](https://forum.freecodecamp.org/u/OriginalNameOriginsO)\
**Post date:** [July 8, 2017, 10:08am UTC](https://forum.freecodecamp.org/t/javascript-algorithm-challenge-falsy-bouncers/134829/1 "2017-07-08T10:08:06Z")

</div>

Am I close to getting it or should I scrap what I’m doing? I tend to get close only to give up later.

function bouncer(arr) {  
var bouncer = arr.filter(function(bouncer)undefined, null, NaN, 0, “”, false);

return arr;  
}

bouncer([7, “ate”, “”, false, 9]);

---

<div class="post-metadata">

**Author:** ![Dasaru](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dasaru/32/57713_2.png) [@Dasaru](https://forum.freecodecamp.org/u/Dasaru)\
**Post date:** [July 9, 2017, 9:12am UTC](https://forum.freecodecamp.org/t/javascript-algorithm-challenge-falsy-bouncers/134829/2 "2017-07-09T09:12:26Z")

</div>

[Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) only has one argument (a [callback function](https://developer.mozilla.org/en-US/docs/Glossary/Callback_function)). Your `arr.filter( )` call is passing 6 arguments.

---

<div class="post-metadata">

**Author:** ![OriginalNameOriginsO](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/originalnameoriginso/32/65288_2.png) [@OriginalNameOriginsO](https://forum.freecodecamp.org/u/OriginalNameOriginsO)\
**Post date:** [July 9, 2017, 7:34pm UTC](https://forum.freecodecamp.org/t/javascript-algorithm-challenge-falsy-bouncers/134829/3 "2017-07-09T19:34:06Z")

</div>

Thanks I manged to get it to work.
