Skip to content

Commit a4e8008

Browse files
authored
Reorder face and number cards in get card value
1 parent 060fc0d commit a4e8008

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
@@ -27,8 +27,8 @@ function getCardValue(card) {
2727
const suit = card.slice(-1);
2828

2929
const validSuits = ["♠", "♥", "♦", "♣"];
30-
const faceCards = ["10", "J", "Q", "K"];
31-
const numberCards = ["2", "3", "4", "5", "6", "7", "8", "9"];
30+
const faceCards = ["J", "Q", "K"];
31+
const numberCards = ["2", "3", "4", "5", "6", "7", "8", "9", "10"];
3232

3333
if (!validSuits.includes(suit)) {
3434
throw new Error("Invalid card suit");

0 commit comments

Comments
 (0)