Skip to content

Commit 108b8cc

Browse files
committed
Updated the condition
1 parent b84aff7 commit 108b8cc

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
@@ -12,7 +12,7 @@ function getCardValue(card) {
1212
if (rank === "A") {
1313
return 11;
1414
}
15-
if (["J", "Q", "K", "10"].includes(rank)) {
15+
else if (["J", "Q", "K", "10"].includes(rank)) {// changed the if with else if
1616
return 10;
1717
} else if (!isNaN(rank)) {
1818
return Number(rank);

0 commit comments

Comments
 (0)