Build a Boolean Check Function - Build a Boolean Check Function

Tell us what’s happening:

My code can’t seen to pass beyond step one but the return value are all check out. Am I missing something or my whole function wrong? I am so confuse.

Your code so far

const booWho = (argument) => {
  return argument === true || argument === false ? console.log(`true`) : console.log(`false`);
}
booWho(true);
booWho(false);
booWho([1, 2, 3]);
booWho([].slice);
booWho({ "a": 1 });
booWho(1);
booWho(NaN);
booWho("a");
booWho("true");
booWho("false");

Your browser information:

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

Challenge Information:

Build a Boolean Check Function - Build a Boolean Check Function

Does it make sense to return console.log()? What does return do? What does console.log() do?

How can you check to see if each argument passed in is a boolean type?

1 Like

So should I use typeof method?

do not use console.log and string just return true and false.

1 Like

I got it lol. I am such an idiot. My return value is being string . `All I need is remove `` from return value and log console outside of function.` Thank you.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.