Hello, how are you?
I am doing the counting cards but every time i try to run the test is coming as mistake, could you help me figure out the mistake?
i already he wrote the text many times is always come to the same error saying that the value of return is not bet or hold.
Could you help me understand what i am doing wrong?
thank you very much
down below is way i wrote my code
let count = 0;
function cc(card) {
// Only change code below this line
switch(card) {
case 2:
case 3:
case 4:
case 5:
case 6:
count++;
break;
case 10:
case "J":
case "Q":
case "K":
case "A":
count--;
break;
}
if(count > 0) {
return count + + "Bet";
} else {
return count + + "Hold";
}
return "Change Me";
// Only change code above this line
}
cc(2); cc(3); cc(7); cc('K'); cc('A');