Basic JavaScript - Use Conditional Logic with If Statements

Tell us what’s happening:

Describe your issue in detail here.
The test kept declining and when I checked my code everything is correct

Your code so far

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


  // Only change code above this line

}
console.log(trueOrFalse(true));

Your browser information:

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

Challenge Information:

Basic JavaScript - Use Conditional Logic with If Statements

1 Like

Hi, welcome to our forum.
You included a space before this text. It won’t return what is required.

2 Likes

Thanks , looked like a tiny mistake but it caused a whole host of errors

1 Like

guess I understand the plight of fellow programmers when they had to deal with these errors

2 Likes

That’s why sometimes we need a second pair of eyes.

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.