Tell us what’s happening:
the problem is only in Cards Sequence 2, J, 9, 2, 7 should return 1 Bet
Your code so far
var count = 0;
var decision ="";
var i=0;
function cc(card) {
// Only change code below this line
switch (card){
case (2||3||4||5||6): i=1;break;
case (7||8||9):i=0;break;
case(10||'J'||'Q'||'K'||'A'):i=-1;break;
}
count+=i;
if (count <=0) {decision="Hold"}else decision="Bet";
return(count+" "+decision)
}