mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-01-17 12:09:00 -05:00
406 B
406 B
title
| title |
|---|
| Comparison with the Greater Than Operator |
Comparison with the Greater Than Operator
> (Greater Than) is a logical operator that returns true case the value on the left is higher than the one on the right.
Basic Solution
function testGreaterThan(val) {
if (val > 100)
return "Over 100";
if (val > 10)
return "Over 10";
return "10 or Under";
}