Correct Return String; however, it states it is wrong

Tell us what’s happening:

Your code so far

function trueOrFalse(wasThatTrue) {
// Only change code below this line
if (wasThatTrue = true) {
  return "Yes, that was true"
} else {
  return "No, that was false"
// Only change code above this line


Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15.

Challenge: Use Conditional Logic with If Statements

Link to the challenge:

Hello and welcome to the freeCodeCamp community~!

You have a typo in your conditional here which is causing the test to fail.

1 Like