Build a Card Counting Assistant - Build a Card Counting Assistant

Tell us what’s happening:

test 4, 6,7,8,9,10 fail while the result is as asked?

Your code so far

let count = 0;

function cc(card){

  let result = "";
  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 --;
      break;
    default:
      break;
  }
  if(count > 0){
    result= `${count} Bet`; 
  }else{
    result= `${count} Hold`;
  }
  return result;
}
console.log(cc("2"));
console.log(cc("3"));
console.log(cc("4"));
console.log(cc("5"));
console.log(cc("6"));
console.log(cc("7"));
console.log(cc("8"));
console.log(cc("9"));






Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36 Edg/139.0.0.0

Challenge Information:

Build a Card Counting Assistant - Build a Card Counting Assistant
https://www.freecodecamp.org/learn/full-stack-developer/lab-counting-cards/lab-counting-cards

read user story 3 again