Please could someone explain to me how the following code works?
function bouncer(arr) {
return arr.filter(function(item) {
return item;
});
}
bouncer([7, "ate", "", false, 9]);
This passes the Falsy Bouncer challenge, but I don’t understand what part of it is calculating whether or not the ‘item’ is a truthy or falsy if no conditions have been set. I’ve been researching the .filter() method and JS return statements but can’t find an explanation for this.
**Link to the challenge:**
https://www.freecodecamp.org/challenges/falsy-bouncer