Hi everyone,
Can someone please tell me what’s wrong with my code?! Thanks in advance!
var count = 0;
function cc(card) {
// Only change code below this line
switch(card) {
case 2:
case 3:
case 4:
case 5:
case 6:
count ++;
return count + " Bet";
break;
case 7:
case 8:
case 9:
return count + " Hold";
break;
case 10:
case "J":
case "Q":
case "K":
case "A":
count --;
return count + " Hold";
break;
}
// Only change code above this line
}
// Add/remove calls to test your function.
// Note: Only the last will display
cc(2); cc(3); cc(7); cc('K'); cc('A');