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 9c478cd commit 8cb7495Copy full SHA for 8cb7495
Sprint-3/1-key-implement/2-is-proper-fraction.js
@@ -8,11 +8,9 @@
8
// write one test at a time, and make it pass, build your solution up methodically
9
10
function isProperFraction(numerator, denominator) {
11
- if (denominator === 0) {
12
- // Denominator can't be zero in a valid fraction
13
- return false;
14
- }
15
- // if (numerator < denominator) return true; it will not work for negative numbers
+ if (numerator < denominator) return true; //it will is proper fraction
+ if (denominator === 0) return false; // Denominator cannot be zero
+
16
return Math.abs(numerator) < Math.abs(denominator);
17
}
18
0 commit comments