Hello, I am having the same problem as the original author of this post.
I wrote the card counting program using a switch statement followed by a couple of if statements like so:
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=+1;
break;
case 7:
case 8:
case 9:
count=count;
case 10:
case "J":
case "Q":
case "K":
case "A":
count=-1;
break;
}
if (count<=0) {
return count + "Hold";
}
if (count>0) {
return count + "Bet";
}
}
I feel like something is off with the logic I used in the program because I can get the answer I want if I input a single argument in the function but still cannot pass the challenge
Please tell me what I am doing wrong.