Tell us what’s happening:
I can’t fully understand the double return statement here. How come the second return statement is not executed even if the first one is ? Does this mean the function is not executing anything else after the If statement if it’s true ?
Your code so far
function testLogicalOr(val) {
// Only change code below this line
if (val) {
return "Outside";
}
// Only change code above this line
return "Inside";
}
testLogicalOr(15);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0
Challenge: Basic JavaScript - Comparisons with the Logical Or Operator
Link to the challenge: