Tell us what’s happening:
Describe your issue in detail here.
Your code so far
function trueOrFalse(wasThatTrue) {
// Only change code below this line
if (wasThatTrue) { return "It was true";
}
return "It was false";
// Only change code above this line
}
trueOrFalse(true);
trueOrFalse(false);
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5.2 Safari/605.1.15
Challenge: Basic JavaScript - Use Conditional Logic with If Statements
yes, it is. I already established trueOrFalse should be a function, trueOr False(true ) should return a string, also for false, the problem is trueOrFalse(true) should return the string Yes it was true and if false no it was false
“Create an if statement inside the function to return Yes, that was true if the parameter wasThatTrue is true and return No, that was false otherwise.”
I don’t see the strings “Yes, that was true” and “No, that was false” in your code.
If you have a question about a specific challenge as it relates to your written code for that challenge need some help, click the Ask for Help button. This button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.