# Card Counting help (not the solution but a nudge in the right direction please) [SOLVED]

I’ve been at this for several hours; and I’m stuck.

In my code I passed 3 of the 7 requirements. What I’m not grasping is how to code up a switch statement for when a specific card sequence is required to pass the exercise.

Here are the requirements (the first 3 I coded properly):
Cards Sequence 2, 3, 4, 5, 6 should return "5 Bet"
Cards Sequence 7, 8, 9 should return "0 Hold"
Cards Sequence 10, J, Q, K, A should return "-5 Hold"
Cards Sequence 3, 7, Q, 8, A should return "-1 Hold"
Cards Sequence 2, J, 9, 2, 7 should return "1 Bet"
Cards Sequence 2, 2, 10 should return "1 Bet"
Cards Sequence 3, 2, A, 10, K should return “-1 Hold”

``````var count = 0;

function cc(card) {
// Only change code below this line

switch(card){
case 2:
case 3:
case 4:
case 5:
case 6:
card= "5 Bet";
count +=1;
break;
case 7:
case 8:
case 9:
card="0 Hold";
//      count +=1;
break;
case 10:
case 'J':
case 'Q':
case 'K':
case 'A':
card="-5 Hold";
count -=1;
break;

// case 3,7,'Q',8,'A':
case 3:
case 7:
case 'Q':
case 8:
case 'A':
card= "-1 Hold";
count -=1;
break;
// case 2,'J',9,2,7:
case 2:
case 'J':
case 9:
case 2:
case 7:
card= "1 Bet";
count +=1;
break;
//case 2,2,10:
case 2:
case 2:
case 10:
card= "1 Bet";
count +=1;
break;
//case 3,2,'A',10,'K':
case 3:
case 2:
case 'A':
case 10:
case 'K':
card= "-1 Hold";
count -=1;
break;
}

return card;//"Change Me";
// Only change code above this line
}

// Add/remove calls to test your function.
// Note: Only the last will display
//cc(3); cc(7); cc('Q'); cc(8); cc('A');
cc(2); cc('J'); cc(9); cc(2); cc(7);