I have checked this code against the solution and cant for the life of me find any difference in the two. It says that it returns correctly for a true condition but not for a false one. Please help, is this a bug or am I being stupid and have left out some little detail?
**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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36
Challenge: Basic JavaScript - Use Conditional Logic with If Statements
Here you are setting wasThatTrue equal to the boolean value true. You should instead use the comparison operator === (though, you could also omit this check).