Skip to content

Commit 7c6010a

Browse files
authored
Update 3-get-card-value.js
spelling correcetion
1 parent 2bfd808 commit 7c6010a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sprint-3/2-mandatory-rewrite/3-get-card-value.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ function getCardValue(card) {
44
const rank = card.slice(0, -1); // Extract rank (everything except the last character)
55
if (rank === "A") return 11; // handle Ace as 11
66
if (["K", "Q", "J"].includes(rank)) return 10; // handle face cards as 10
7-
const numerincRank = parseInt(rank); //Handle number cards 2–9
8-
if (numerincRank >= 2 && numerincRank <= 9) {
9-
return numerincRank; // Return the numeric value for cards 2-9
7+
const numericRank = parseInt(rank); //Handle number cards 2–9
8+
if (numericRank >= 2 && numericRank <= 9) {
9+
return numericRank; // Return the numeric value for cards 2-9
1010
}
1111
// Invalid card rank
1212
return 0;

0 commit comments

Comments
 (0)