Comparisons with the Logical Or Operator
Summary
- The logical or operator (
||
) returnstrue
if either of the operands istrue
. Otherwise, it returnsfalse
.
Final Code
function testLogicalOr(val) {
// Only change code below this line
if (val < 10 || val > 20) {
return "Outside";
}
// Only change code above this line
return "Inside";
}
testLogicalOr(15);