Basic Algorithm Scripting: Falsy Bouncer

Tell us what’s happening:
Hi, this is my code so far for this exercise. My code seems to make sense to me, but it’s not working so I’m not sure what I’m doing wrong. Thanks in advance!

Your code so far


function bouncer(arr) {
  // Don't show a false ID to this bouncer.
   
    for (i = 0; i < arr.length; i++) {
    if (arr[i] == Boolean) {
    arr.splice(arr[i], 1);
    }
  } 
 
return arr;
}

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

Your browser information:

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

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

function bouncer(arr) {
  // Don't show a false ID to this bouncer.



  for(var i=0;i<arr.length;i++){
    
    if(arr[i]){;}
  else {arr.splice(i,1)}     
  
  }
  return arr;
  //console.log(arr)// arr;
}

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

why is the above code not working ?