Falsy Bouncer - Only covers half the cases

Hi,

I checked out the solutions on this one finally. However I am not sure why the code below doesn’t work. Or ‘return val != Boolean()’ seems to work only for the first half of “” cases. Why are the other cases NaN, etc, omitted under this interpretation ?

Your code so far

function bouncer(arr) {
  // Don't show a false ID to this bouncer.
  var filteredArray = arr.filter(isFalse);     
  console.log(filteredArray);
  return filteredArray;                               
}

function isFalse(val) {
  return val != Boolean();
}

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

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36.

Link to the challenge:

Ah, okay. For one I see the tautological error there, thanks for pointing that out. Obviously ‘!=’ would not be the appropriate operator there-- However, even with this logic, using even standard equality ‘==’ or strict ‘===’, should pass those cases, no ? But that doesn’t work either.

I believe this is the right term, but it is the ‘functional’ nature of commands like filter that I am still trying to wrap my head around as this style of programming is new to me.

Thanks for your help Randell.