True or False statements

Tell us what’s happening:
I cant pass this. Need help.

Your code so far

function trueOrFalse(wasThatTrue) {
// Only change code below this line

if (trueOrFalse) {
  return "Yes, that was true";
  return "No, that was false";
// Only change code above this line


Your browser information:

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

Challenge: Use Conditional Logic with If Statements

Link to the challenge:

Your problem is here:

if (trueOrFalse) {

What do you want to check? That is a function. What is the boolean variable you are passing in?

1 Like
function nameOfFunction (parameter) {
  // You use the parameter here

You are saying “if (nameOfFunction) do something”, which doesn’t really make sense

1 Like

thanks, just corrected myself

1 Like

Thanks, solved it now