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…?

Thanks!! I got it now!

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