Tell us what’s happening:
Describe your issue in detail here.
Your code so far
function trueOrFalse(wasThatTrue) {
// Only change code below this line
if (wasThatTrue= false){
return "No, that was false";
}
return "Yes, that was true";
// 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/108.0.0.0 Safari/537.36
Challenge: Basic JavaScript - Use Conditional Logic with If Statements
The problem is that you used = (the assignment operator) instead of === or == (condition verifiers).
The assignment operator is used when declaring variables not to check for similarity in conditionals, in conditionals you use the condition verifiers.
Here you didnt add the closing curly bracket, though i reccomend you use else instead.
So if you apply all that i have said, your code should look like this:
function trueOrFalse(wasThatTrue) {
// Only change code below this line
if (wasThatTrue === false){
return "No, that was false";
} else {
return "Yes, that was true";
}
// Only change code above this line
}