We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3fafedf commit 7a5fe08Copy full SHA for 7a5fe08
Sprint-3/2-mandatory-rewrite/2-is-proper-fraction.js
@@ -1,6 +1,7 @@
1
function isProperFraction(numerator, denominator) {
2
- if (numerator < denominator) return true;
3
- // add your completed function from key-implement here
+ if (Math.abs(numerator) < Math.abs(denominator)) return true; // This version of code works correctly for proper and negative fractions.
+ if (Math.abs(numerator) >= Math.abs(denominator)) return false;
4
+ if (Math.abs(numerator) === Math.abs(denominator)) return false;
5
}
6
-module.exports = isProperFraction;
7
+module.exports = isProperFraction;
0 commit comments