Tell us what’s happening:
Can anyone tell me whats wrong with my code?
**Your code so far**
var count = 0;
function cc(card) {
// Only change code below this line
if(card == 2 || card == 3 || card == 4 || card == 5 || card == 6){
count++;
}
else if (card == 7 || card == 8 || card == 9){
count = count;
}
else{
count--;
}
if(count <= 0){
console.log(count + " Hold");
}
else{
console.log(count + " Bet");
}
}
// Only change code above this line
cc(2); cc(3); cc(7); cc('K'); cc('A');
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36
Challenge: Counting Cards
Link to the challenge: