Logical or Operator

Tell us what’s happening:
please i need to understand the meaning of the instruction where it talks about “if var is not between 10 and 20, inclusive” but from the exercise i can see that val is 15 and therefore i dont understand why my code does not work if the logical operator returns true if either of the operand is true. Someone please help i am still new to Javascript. I have checked up the answer but i need to understand the basic concept behind the concept. Thank you

Your code so far


function testLogicalOr(val) {
// Only change code below this line

if (val > 25 || val <10) {
  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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36.

Challenge: Comparisons with the Logical Or Operator

Link to the challenge:

the tests call the function multiple times with different numbers passed in

you should see that when you run the tests the console give this output:

testLogicalOr(21) should return "Outside"
testLogicalOr(25) should return "Outside"

what does your code returns for those value?

you can even just test it by adding console.log(testLogicalOr(21)) as last line of your code

then, can you figure out why that is the output?

Thank you a lot it worked out fine