There was an error while loading. Please reload this page.
1 parent a8c0c3b commit 4eb7cd7Copy full SHA for 4eb7cd7
1 file changed
Sprint-3/1-implement-and-rewrite-tests/implement/3-get-card-value.js
@@ -26,11 +26,7 @@ function getCardValue(card) {
26
if (card === "") {
27
throw new Error("No card was played");
28
}
29
- if (card.length < 2 || card.length > 3) {
30
- throw new Error(
31
- "Invalid card played, rank and suit cannot be less than 1 or more than 3"
32
- );
33
- }
+
34
const rank = card.slice(0, -1).toUpperCase();
35
const suit = card.slice(-1);
36
0 commit comments