Pls I need help

Pls what is wrong with my code

function trueOrFalse(wasThatTrue) {
  // Only change code below this line
if (true) {
  return "Yes, that was true";
return "No, that was false";
  // Only change code above this line


trueOrFalse(false) should return the string No, that was false

If “what” is true? What are you supposed to be checking to see if it is true?

HI @ahmads14nabil !

I have edited your post to include the challenge link.

When posting to the forum, please always include the link to the challenge you are working on :+1:

In the case above the value false is passed as the argument to the function. Inside the function, what variable represents the argument passed in? That is what you should be checking to see if is true.

What part of what I said do you not understsand?

Sorry my mistake, I understand it now.

The instructions state:

Create an if statement inside the function to return Yes, that was true if the parameter wasThatTrue is true

Your solution is not using the parameter wasThatTrue. This parameter’s value is what determines the return value of the function.