Stuck with a bug

Please I need help with this code. I don’t know why it’s not passing the test. I have checked every line. Also checked the strings, spelled correctly.

function trueOrFalse(wasThatTrue) {

// Only change code below this line


return “Yes, that was true”;
return “No, that was false”;

// Only change code above this line


Hi! You were very close with your function! The if statement needs to address the options. The options in this function are true OR false. If true - then do this. If false - then do that. I hope that helps!


1 Like

you could just change the argument you placed in the if statement to WasThatTrue and it would work just fine i guess.

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

That makes a lot of sense! Thank you for letting me know! Will do as suggested in the future.

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