I know I’m “coloring outside the lines” with this question but in this example if I change the trueOrFalse(true) function to something completely unexpected like “blue” I would expect a return of false. Instead I get "ReferenceError: can’t find variable: blue.
Can someone explain this to me?
Your code so far
// 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(blue);
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8
.
Link to the challenge: