---
title: Comparisons with the Logical Or Operator
---
## Comparisons with the Logical Or Operator

### Guide: Follow the code given in the example
**Spoiler Alert**


Below is the sample code (the simplest way).

```javascript
if ( val < 10 || val > 20 ) {
    return "Outside";
}
```

The above code will return "Outside" only if `val` is between 10 and 20 (inclusive).

