Basic JavaScript: Use Conditional Logic with If Statements

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/use-conditional-logic-with-if-statements

The last "trueOrFalse(false) should return “No, that was false” challenge is not passing. why?

function trueOrFalse(wasThatTrue) {

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

}


You used an assignment operator instead of an equality. This ‘=’ and ‘==’ are not same!

Thanks a lot, that fixed it :slight_smile: i hadn’t learned the difference (i think) but i wasn’t even supposed to use either. Just if (statement) worked fine.