We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb90283 commit 8b3fd7aCopy full SHA for 8b3fd7a
Sprint-3/2-mandatory-rewrite/3-get-card-value.js
@@ -33,7 +33,8 @@ function getCardValue(card) {
33
if (["K", "Q", "J"].includes(rank)) return 10;
34
35
// If rank is numeric (2-10), safely convert to number
36
- return parseInt(rank, 10);
+ // we can use 'Number(rank)' instead of 'parseint(rank, 10)'
37
+ return Number(rank);
38
}
39
40
module.exports = getCardValue;
0 commit comments