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 22cbee3 commit 9ab2716Copy full SHA for 9ab2716
Sprint-3/1-implement-and-rewrite-tests/implement/3-get-card-value.js
@@ -39,9 +39,15 @@ function getCardValue(card) {
39
}
40
41
// Compute value
42
- if (rank === "A") return 11;
43
-if (["J","Q","K"].includes(rank)) return 10;
44
-return parseInt(rank);
+if (rank === "A") {
+ return 11;
+}
45
+
46
+if (["J", "Q", "K"].includes(rank)) {
47
+ return 10;
48
49
50
+return parseInt(rank);
51
52
53
// The line below allows us to load the getCardValue function into tests in other files.
@@ -77,5 +83,4 @@ try {
77
83
78
84
try { getCardValue("9X"); // Invalid suit
79
85
console.error("Error was not thrown for invalid suit");
80
-} catch (e) {}
81
-*/
86
+} catch (e) {} */
0 commit comments