Tell us what’s happening:
Hi. i can’t figure why when i passed false as an argument to my function, it doesnt return me true, since false is a boolean. Where am I wrong there? I checked the answer but it’s a different method. I’d like to pass this test with an if else condition. THanks
Your code so far
function booWho(bool) {
// What is the new fad diet for ghost developers? The Boolean.
if (typeof bool === 'boolean') {
return bool;
}
else {
return false
}
}
booWho(null);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-algorithm-scripting/boo-who