Issue in excercise

In the following excercise there is an issue :

The following is my solution but not passing the test even though for a false parameter it is working perfectly…

function trueOrFalse(wasThatTrue) {
  // Only change code below this line
  if(wasThatTrue === true){
    return "Yes, that was true";
  } else {
    return "It was false";

  // Only change code above this line


// running tests


should return “No, that was false” // tests completed //

console output It was false


This line is incorrect. Take a look at what the tests expect you to return here. :slight_smile:

1 Like

Thank you, you were right, the string was wrong!!

1 Like

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

Please use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks are not single quotes.