Use Conditional Logic with if

here is my code:

function trueOrFalse(wasThatTrue) {
if(wasThatTrue)
{
return "Yes,that was True";
}
return "No,that was false";
}
console.log(trueOrFalse(true));

The errors are:

trueOrFalse(true)
should return the string
Yes, that was true`
trueOrFalse(false)
should return the string
No, that was false
// tests completed // console output Yes,that was True Yes,that was True

Your strings don’t perfectly match.

I think your errors are just with your strings. Double check your spaces, punctuation, and capitalization.

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