Falsy Bouncer helpppp

Falsy Bouncer helpppp
0

#1

am i doing something wrong?

Your code so far


function bouncer(arr) {
  // Don't show a false ID to this bouncer.
  function boolval(){
    return boolean;
  }
  return arr.filter(boolval);


}

bouncer([7, "ate", "", false, 9]);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-algorithm-scripting/falsy-bouncer


#2

Capitalize b in boolean!


#3

it doesnt remain a data type then


#4

The filter function boolval needs to accept a parameter.

For example:

function filterFunction (item) {
  return item
}
arr.filter(filterFunction)

#5
function bouncer(arr) {
  // Don't show a false ID to this bouncer.
  function boolval(arr){
    return true;
  }
  return arr.filter(boolval);


}

something like this?


#6
arr.filter(function boolval(item) {
 return item
})