Error Lesson Use if Statements

Tell us what’s happening:
I keep getting the response: trueOrFalse(false) should return the string No, that was false
As far as I can tell I have done exactly what this assignment asks of me. I even went as far to copy the exact phrase to make sure I don’t have any misspellings or typo issues.
Is this a bug? How can I proceed to the next assignment?

  **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; rv:101.0) Gecko/20100101 Firefox/101.0

Challenge: Use Conditional Logic with If Statements

Link to the challenge:

trueOrFalse is the name of this function so you don’t want to be checking that. You want to check the value that is passed into the function. What is the name of that value?

Thanks for your reply.
That value is wasThatTrue.
However, when I correct that mistake I still get the same response.

I copied your code exactly and just changed trueOrFalse to wasThatTrue in the if statement and it passed for me. If it is still not passing for you then please paste your updated code in here so we can see exactly what you are doing.

I did a reset and copypaste of my code and now it works. Thanks for your help!

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