Hello,
I am wondering about this particular exercise in the Basic JS module of the JS Algorithms and Data Structures certification program. Is it a general “rule” that the numbers themselves are inclusive—regardless of < or > signs—whenever we use a Logical “Or” operator? My intuitive thought would be that they wouldn’t be included. The default lesson code threw me off:
if (num > 10) {
return "No";
}
if (num < 5) {
return "No";
}
return "Yes";
// will return "Yes" only if num is between 5 and 10 (5 and 10 included). The same logic can be written as:
Can anyone shed any light on this? Thanks! Glad to be a part of FCC.
**Your browser information:**
Challenge: Comparisons with the Logical Or Operator
Link to the challenge: