Solution for Use Conditional Logic with If Statements

Solution for Use Conditional Logic with If Statements
0.0 0

#1

This was kind of tricky but I finally got it. Hope this helps other people:

// Example
function ourTrueOrFalse(isItTrue) {
if (isItTrue) {
return “Yes, it’s true”;
}
return “No, it’s false”;
}

// Setup
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.

}

// Change this value to test
trueOrFalse(true);