Files

28 lines
480 B
Markdown
Raw Normal View History

2018-10-12 15:37:13 -04:00
---
title: Comparison with the Less Than Operator
---
# Comparison with the Less Than Operator
2018-10-12 15:37:13 -04:00
---
## Hints
### Hint 1
2018-10-12 15:37:13 -04:00
**`<`** (Less Than) is a logical operator that returns true case the value on the left is lower than the one on the right.
---
## Solutions
<details><summary>Solution 1 (Click to Show/Hide)</summary>
2018-10-12 15:37:13 -04:00
```javascript
function testLessThan(val) {
if (val < 25) return "Under 25";
if (val < 55) return "Under 55";
2018-10-12 15:37:13 -04:00
return "55 or Over";
}
```
</details>