Not sure why this doesn’t work and unsure where to go from here.
function bouncer(arr) {
//Don't show a false ID to this bouncer.//
function getItOut(value) {
for (var i = 0; i < arr.length ; i++) {
if ( arr[i] === false ) {
return value;
}
} return arr.filter(getItOut);
}
}
bouncer(["a", "b", "c"]);
I edited your post a bit. You used the code formatting backticks, which is great, but they need to be on their own lines for the formatting to work. I also added spoiler tags because we’re looking at one of the challenges.
You’re using “arr” instead of the local variable “value” and you’ll probably want to change it from arr[i] === false to arr[i] !== false, or falseValues.indexOf(arr[i]) === -1 where falseValues is an array of false values.
How do you get your code to color and format like that?