Basic JavaScript - Use Conditional Logic with If Statements

Not sure if its a bug with this section, but I can’t progress even checking and typing in the appropriate codes. Pls advise and assist!

  **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";
}

trueOrFalse(true);
trueOrFalse(false);
// Only change code above this line

}
  **Your browser information:**

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

Challenge: Basic JavaScript - Use Conditional Logic with If Statements

Link to the challenge:

Hi @jaydenkeh ,

It appears that your solution is correct, but you have a trailing bracket at the end of your provided code.

Hey mate your right it works now! Thanks for the feedback.

1 Like