# Javascript blackjack Counting Cards

Tell us what’s happening:
I’m trying to do this without directly looking for the answer. so this is what i’ve done so far…
can anybody give me a hint what i did wrong ?

``````
var count = 0;

function cc(card) {
// Only change code below this line
if (card >=2 && card <=6){
count += card;
return  count + " Bet";
}else if(card >=7&& card <=9){
count += card;
return count + " Hold";
}else if (card ==10||card =='J'||
card == 'Q'||card =='K'||card =='A'){
count += card;
return count + " Hold";
}

}

// Only change code above this line

// Note: Only the last will display
cc(2); cc(3); cc(7); cc('K'); cc('A');
``````

User Agent is: `Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36`.

You don’t add `card` to the `count`. The specific values to add are listed under the instruction.

I will give you a small hint by asking you a question.

If a card is a 2, 3, 4, 5, or 6 how much should the value of the count variable change? Once you answer this question, look at the value you are adding to the count variable for the applicable if statement.

var count = 0;

function cc(card) {
// Only change code below this line
if (card >=2 && card <=6){
count += 1;
return count + " Bet";
}else if(card >=7&& card <=9){
count += 0;
return count + " Hold";
}else if (card ==10||card ==‘J’||
card == ‘Q’||card ==‘K’||card ==‘A’){
count -= 1;
return count + " Hold";
}

}

// Only change code above this line

Thank you. but I’m still stuck 