Skip to content

Commit 3c92b48

Browse files
fixed the logic error or the two return value in the finction a
1 parent 49b88ad commit 3c92b48

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,8 @@
1111
// execute the code to ensure all tests pass.
1212

1313
function isProperFraction(numerator, denominator) {
14-
if (denominator >numerator && denominator !==0) {
15-
return ture ;
16-
17-
}
18-
else{
19-
return false;
20-
}
14+
if (denominator === 0) return false; // matches your test expectation
2115
return Math.abs(numerator) < Math.abs(denominator);
22-
// TODO: Implement this function
2316
}
2417

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

0 commit comments

Comments
 (0)