Challenge
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.
My Solution:
function trueOrFalse (wasThatTrue) {
// Only change code below this line
if (wasThatTrue) {
return "Yes that was true";
} else {
return "No That was false";
}
}
trueOrFalse(true);
// Only change code above this line
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.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
Thank soo much Naomi for the timely response. I have realize the commas after the Yes and No were missing and also the uppercase “T” in the “No” string were the cause. It passed after fixing them.
Cheers!