I passed the “Counting Cards” exercise (as part of the “Basic JS” track, but I can’t say that I actually UNDERSTAND what’s happening.

So… if cc(2), then it increments by 1, since it corresponds to case 2? and so forth for cc(‘A’), it would decrement by 1 since it corresponds to case A? sorry - i’m just having trouble understanding how this works.

This is my code:

```
var count = 0;
function cc(card) {
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--;
}
if(count > 0) {
return count + " Bet";
} else {
return count + " Hold";
}
cc(2); cc(3); cc(7); cc('K'); cc('A');
```