Skip to content

Commit 49b1ad5

Browse files
committed
refactor return for isProperFraction
1 parent 9a65372 commit 49b1ad5

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

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

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

1313
function isProperFraction(numerator, denominator) {
1414
// TODO: Implement this function
15-
if (denominator === 0 || Math.abs(numerator / denominator) > 1) {
16-
return false;
17-
}
18-
return true;
15+
return denominator !== 0 && Math.abs(numerator / denominator) < 1;
1916
}
2017

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

0 commit comments

Comments
 (0)