Is this lesson short?

hey, i already passed the test. but i couldn’t figure out the logic behind it. because there should be extra codes. am i wrong ? cause other wise where is the part of code that triggers function with True or False data ?

  **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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36

Challenge: Use Conditional Logic with If Statements

Link to the challenge:

Yes the test cases are not included in the code. You can read what they do on the bottom left on desktop. But you cannot access the code directly.

Hey, I recommend you to check on MDN Webdocs about falsy and truthy values. That will help you to have a better understanding of that.

it does the tests and checks for you. As @Jagaya mentioned

You can read what they do on the bottom left on desktop

As stated, the tests are run behind the scenes. The test imports that function and runs the tests there. You can of course test it yourself. You can put this at the bottom of the code pane:


and see the output below. This will have no affect on the tests.