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 1a4482e commit aabad30Copy full SHA for aabad30
Sprint-3/1-implement-and-rewrite-tests/implement/3-get-card-value.js
@@ -48,7 +48,7 @@ function getCardValue(card) {
48
49
const num = Number(rank);
50
// if card is a number card and card is bigger than 2 and less than 10 ("2" to "10"), should return its numerical value
51
- if (rank !== String(num) || num < 2 || num > 10) {
+ if (!Number.isInteger(num) || rank !== String(num) || num < 2 || num > 10) {
52
throw new Error("Error invalid card");
53
}
54
return num;
0 commit comments