Implement a Falsy Remover - Implement a Falsy Remover

Tell us what’s happening:

I don’t know.
Failing test 2, 3, 4, 5, and 6.
I’m looping through the array, coercing values via a conditional, pushing to new array if it’s true, skipping otherwise.

My VSCode output is correct, as in expected output = my output

Your code so far

function bouncer(arr) {
    let truthyValues = [];
    for (elem of arr) {
        if (elem) {
            truthyValues.push(elem);
        }
    }
    return truthyValues;
};

Your browser information:

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

Challenge Information:

Implement a Falsy Remover - Implement a Falsy Remover

try calling the function in the editor, you will see an error that needs to be addressed

Check the console for errors. Your variables are not all declared.