Skip to content

Commit 0bf4436

Browse files
committed
Remove isNaN check because of coerced conversion
1 parent 31270ee commit 0bf4436

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function getCardValue(card) {
1414
return 11;
1515
} else if (["J", "Q", "K"].includes(rank)) {
1616
return 10;
17-
} else if (!isNaN(rank) && rank >= 2 && rank <= 10) {
17+
} else if (rank >= 2 && rank <= 10) {
1818
return Number(rank);
1919
} else {
2020
return "Invalid card rank.";

0 commit comments

Comments
 (0)