Basic JavaScript - Use Conditional Logic with If Statements

Tell us what’s happening:
I have looked for the help in get the hint section and i copied the exact code but i am unable to pass the test. please somebody help me !
Your code so far

function trueOrFalse(wasThatTrue) {
  // Only change code below this line
if (wasThatTrue = true) {
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 (X11; CrOS armv7l 13597.84.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36

Challenge: Basic JavaScript - Use Conditional Logic with If Statements

Link to the challenge:

This is a common mistake, but it’s important to recognise the difference between a comparison operator and an assignment operator.

1 Like

thankyou, i found my mistake. :sweat_smile: :sweat_smile:

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