Basic JavaScript - Use Conditional Logic with If Statements

What’s is wrong with my code?

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

}

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 13; 23028RNCAG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Mobile Safari/537.36

Challenge: Basic JavaScript - Use Conditional Logic with If Statements

Link to the challenge:

You don’t need the closing curly brace after the second ‘return’ statement.

2 Likes

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