Skip to content

Commit 5a30847

Browse files
committed
to change answer
1 parent e717737 commit 5a30847

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
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 (rank >= "2" && rank <= "9") {
15+
if (rank === "10" || (rank >= "2" && rank <= "9")) {
1616
return Number(rank);
1717
}
1818
if (rank === "J" || rank === "Q" || rank === "K") {
@@ -53,7 +53,7 @@ assertEquals(fiveofHearts, 5);
5353
// Given a card with a rank of "10," "J," "Q," or "K",
5454
// When the function is called with such a card,
5555
// Then it should return the value 10, as these cards are worth 10 points each in blackjack.
56-
const ten = getCardValue("10");
56+
const ten = getCardValue("10");
5757
assertEquals(ten, 10);
5858

5959
const jack = getCardValue("J♦");

0 commit comments

Comments
 (0)