Skip to content

Commit 7f67cd7

Browse files
corrected syntax error in the commented out code.
1 parent 6b77070 commit 7f67cd7

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@
1111
// execute the code to ensure all tests pass.
1212

1313
function isProperFraction(numerator, denominator) {
14-
if (!Number.isFinite(numerator) || !Number.isFinite(denominator)) {
15-
return false;
16-
}
1714
if (!Number.isInteger(numerator) || !Number.isInteger(denominator)) {
1815
return false;
19-
}
16+
} // provided that the numerator and denominator are integers, not fintite numbers based on the assumption that the parameters are valid numbers (not NaN or Infinity, or any other non-integer numbers)
2017
if (denominator === 0) {
2118
return false;
2219
}
@@ -27,6 +24,7 @@ numerator = Number(numerator);
2724
denominator = Number(denominator);
2825
if (isNaN(numerator) || isNaN(denominator) {
2926
return false;})
27+
*/
3028
// The line below allows us to load the isProperFraction function into tests in other files.
3129
// This will be useful in the "rewrite tests with jest" step.
3230
module.exports = isProperFraction;

0 commit comments

Comments
 (0)