Skip to content

Commit eb0dd5f

Browse files
committed
account for non-positive integers.
1 parent 618efe8 commit eb0dd5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sprint-3/1-implement-and-rewrite-tests/implement/2-is-proper-fraction.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
function isProperFraction(numerator, denominator) {
1414
if (denominator === 0) return false;
15-
return numerator < denominator ? true : false;
15+
return Math.abs(numerator) < Math.abs(denominator);
1616
}
1717

1818
// The line below allows us to load the isProperFraction function into tests in other files.

0 commit comments

Comments
 (0)