Skip to content

Commit 728add3

Browse files
committed
refactored isProperFraction function to handle negative numbers, tests now pass
1 parent 8d09a15 commit 728add3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎implement-and-rewrite-tests/implement/2-is-proper-fraction.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
// execute the code to ensure all tests pass.
1515

1616
export function isProperFraction(numerator, denominator) {
17-
if(numerator < denominator){
17+
if (Math.abs(numerator) < Math.abs(denominator)) {
1818
return true;
19-
} else{
19+
} else {
2020
return false;
2121
}
2222
}

0 commit comments

Comments
 (0)