function bouncer(arr) {
// Don\'t show a false ID to this bouncer.
function a(b) {
if(b !== false) {
return b;
}
}
arr = arr.filte
It's because you return the value. The filter function should return true or false like this:
function bouncer(arr) {
arr = arr.filter(function(x) { console.log(x === true)
if(x !== false) {
return true;
}
});
return arr;
}
or shorter:
function bouncer(arr) {
return arr.filter(function(x) { console.log(x === true)
return x !== false;
});
}