Skip to content

Commit 023e69f

Browse files
committed
Change a variable to a more appropriate name
1 parent 043de8e commit 023e69f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
// execute the code to ensure all tests pass.
2323

2424
function getCardValue(card) {
25-
const lastChar = card.length - 1;
26-
const rank = card.slice(0, lastChar);
27-
const suit = card.slice(lastChar);
25+
const lastCharIndex = card.length - 1;
26+
const rank = card.slice(0, lastCharIndex);
27+
const suit = card.slice(lastCharIndex);
2828

2929
if (rank === "10") {
3030
return 10;

0 commit comments

Comments
 (0)