title: Why does this function filter out 'null' values?
body: <p>I am trying to write a quick function that filters out any falsy values. this seems to grab everything except 'null'.</p>
  
  <p>please help!</p>
  
  <pre><code>function noFalsy(arr) {
  
  var none=function(val){
           switch (val){
             case false:
             case null:
             case "":
             case 0:
             case undefined:
             case NaN:
               return false;
             default:
               return true;
           }
         },
    ans=[];
  ans=arr.filter(none);
  
  
  return ans;
  }
  </code></pre>