Skip to content

Commit f99a296

Browse files
author
Pretty Taruvinga
committed
fixed the change
1 parent 221bb71 commit f99a296

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,7 @@ function isProperFraction(numerator, denominator) {
1414
if (denominator === 0) {
1515
return false; // A fraction with a zero denominator is undefined, so we return false.
1616
}
17-
18-
if (numerator === 0) {
19-
return true; // A fraction with a zero numerator is a proper fraction (0/denominator).
20-
}
21-
if (numerator < 0 && denominator > 0) {
22-
return false;
23-
// Negative numerator, positive denominator
24-
}
2517
return Math.abs(numerator) < Math.abs(denominator);
26-
27-
return numerator < denominator && numerator > 0 && denominator > 0;
2818
}
2919
// The line below allows us to load the isProperFraction function into tests in other files.
3020
// This will be useful in the "rewrite tests with jest" step.

0 commit comments

Comments
 (0)