Skip to content

Commit 26a0fed

Browse files
authored
Simplify isProperFraction function return statement
1 parent 1230568 commit 26a0fed

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

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

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

1313
function isProperFraction(numerator, denominator) {
14-
if (numerator <= denominator && numerator > 0) {
15-
return true;
16-
} else {
17-
return false;
18-
}
14+
return numerator <= denominator && numerator > 0
1915
}
2016

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

0 commit comments

Comments
 (0)