Bugged challenge

Tell us what’s happening:
Describe your issue in detail here.
Tells me the string for false is incorrect even when i copy and paste it

  **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 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36

Challenge: Use Conditional Logic with If Statements

Link to the challenge:

=, ==, and === are different.

if (wasThatTrue = true)

= means that you’re assigning wasThatTrue the value of true. For if statements I always use === to check if a variable has a certain value.

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