Skip to content

Commit 03452aa

Browse files
committed
Made changes based on comments on github.
1 parent ac777a7 commit 03452aa

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

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

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

1313
function isProperFraction(numerator, denominator) {
14-
return Math.abs(numerator) < Math.abs(denominator) ? true : false;
14+
return Math.abs(numerator) < Math.abs(denominator);
1515
}
1616

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

Sprint-3/1-implement-and-rewrite-tests/implement/3-get-card-value.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ function getCardValue(card) {
3434
if (rank === "10" || rank === "J" || rank === "Q" || rank === "K") return 10;
3535

3636
const rankNum = Number(rank);
37-
if (!Number.isNaN(rankNum) && rankNum >= 2 && rankNum < 10) {
37+
if (
38+
!Number.isNaN(rankNum) &&
39+
Number.isInteger(rankNum) &&
40+
rankNum >= 2 &&
41+
rankNum < 10 &&
42+
rank === rankNum.toString()
43+
) {
3844
return rankNum;
3945
}
4046

0 commit comments

Comments
 (0)