← Back to challenges

Fraction Greater Than One

JavaScriptHardlanguage_fundamentalsstringsvalidationmath

Instructions

Given a fraction as a string, return whether or not it is greater than 1 when evaluated.

Examples

greaterThanOne("1/2") ➞ false

greaterThanOne("7/4") ➞ true

greaterThanOne("10/10") ➞ false

Notes

Fractions must be strictly greater than 1 (see example #3).

javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Amazing Edabit!