Use Conditional Logic with If Statements. What am I doing wrong?

Tell us what’s happening:
I can’t tell what I’m doing wrong here. Please, someone, help.

Your code so far

// Example
function ourTrueOrFalse(isItTrue) {
  if (isItTrue) { 
    return "Yes, it's true";
  return "No, it's false";

// Setup
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.


// Change this value to test

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36.

Link to the challenge:

You are not using the whatThatTrue parameter to test if it is true or not in the if condition. If you usetrue as a condition it will allways enter that branch of the if/else block, because true will evaluate allways as true.

The above will always evaluate to true, no matter what you pass into the function. You need to compare the argument named wasThatTrue to the value true instead.

ok wrote it as if(wasThatTrue == true){
return ‘yada’

and it worked. Is that the only way to do it though?

You can also write it as if(wasThatTrue) {
You will learn in a later lesson why.

right after I sent the reply I realized that . I understand why. Thank you!