Tell us what’s happening:
Describe your issue in detail here.
Your code so far
Hi! Where is mistake, please?
function testLogicalOr(val) {
// Only change code below this line
if (val > 20 || val < 10) {
return "Outside";
}
// Only change code above this line
return "Inside";
testLogicalOr(15);
-
Passed:You should use the
||
operator once -
Passed:You should only have one
if
statement -
Passed:
testLogicalOr(0)
should return the stringOutside
-
Passed:
testLogicalOr(9)
should return the stringOutside
-
Failed:
testLogicalOr(10)
should return the stringInside
-
Failed:
testLogicalOr(15)
should return the stringInside
-
Failed:
testLogicalOr(19)
should return the stringInside
-
Failed:
testLogicalOr(20)
should return the stringInside
-
Passed:
testLogicalOr(21)
should return the stringOutside
-
Passed:
testLogicalOr(25)
should return the stringOutside
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Challenge Information:
Basic JavaScript - Comparisons with the Logical Or Operator