← Back to challenges

Correct Inequality Signs

JavaScriptHardstringsregexvalidation

Instructions

Create a function that returns true if a given inequality expression is correct and false otherwise.

Examples

correctSigns("3 < 7 < 11") ➞ true

correctSigns("13 > 44 > 33 > 1") ➞ false

correctSigns("1 < 2 < 6 < 9 > 3") ➞ true

Notes

N/A

javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.