Tell us what’s happening:
I keep getting “trueOrFalse(true) should return the string Yes, that was true”… but it looks like I have written this correctly. Am I missing something?
Your code so far
function trueOrFalse(wasThatTrue) {
// Only change code below this line
function trueOrFalse(wasThatTrue) {
if (wasThatTrue)
return "Yes, that was true";
}
return "No, that was false";
}
// Only change code above this line
Challenge: Basic JavaScript - Use Conditional Logic with If Statements
This looks very similar to what I see when someone copies a solution they find somewhere. I recommend against getting in the habit of copying answers. The point is to practice writing code, not the answer itself. Also, it has been my experience that once people start copying answers, they tend to struggle to write their own code on more complex challenges and the certification projects.
I posted here with a genuine question, after trying to figure out what I am doing wrong and rewriting the answers several times. I am very new to coding and I am trying my best to learn. It is extremely disheartening to be accused of copying and cheating.
Honestly, I am not sure why you discounted my suggestion so quickly if you are trying to learn? (My instinct when I saw your response was to move on to the next person and let you go ahead and figure this out alone but Jeremy is actually kinder than he seems because he engaged with you)