Falsy Bouncer helpppp

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:

Capitalize b in boolean!

it doesnt remain a data type then

The filter function boolval needs to accept a parameter.

For example:

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


}

something like this?

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