Basic JavaScript - Use Conditional Logic with If Statements

Tell us what’s happening:
Describe your issue in detail here.

I can’t see what’s happening here… seems good to me
The system say that " trueOrFalse(false) should return the string No, that was false". And thats what I did… Thanks for the 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

}

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/107.0.0.0 Safari/537.36 Edg/107.0.1418.56

Challenge: Basic JavaScript - Use Conditional Logic with If Statements

Link to the challenge:

please explain to me what this function trueOrFalse is doing with the wasThatTrue parameter if anything…?

The instructions say return "Yes, tht was true" if the parameter wasThatTrue is true.

Your function (trueOrFalse) is not checking to see if the parameter wasThatTrue is true. Instead, your function (trueOrFalse) is testing of the function (trueOrFalse) is true. That is not what you should be doing.

Thanks!! I got it now!