Skip to content

Commit 9543df3

Browse files
committed
Refactor to shorter return statement for boolean return value
1 parent abe2eb3 commit 9543df3

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,5 @@
1616
export function isProperFraction(numerator, denominator) {
1717
const fraction = Math.abs(numerator / denominator);
1818

19-
if (fraction >= 0 && fraction < 1) {
20-
return true;
21-
}
22-
23-
return false;
19+
return fraction >= 0 && fraction < 1;
2420
}

0 commit comments

Comments
 (0)