Lo he hecho varias veces y sigue sin funcionar

Cuéntanos qué está pasando:
Describe tu problema en detalle aquí.

He realizado el codigo del juego de conteo de cartas y primero pensé que era mi problema que lo hacia mal, pero después me fijé que aun copiando y pegando la solución propuesta por la plataforma no funciona igual. Alguien me puede ayudar?

  **Tu código hasta el momento**

let count = 0;

function cc(card) {
// Cambia solo el código debajo de esta línea

switch(card){
  case 2:
  case 3:
  case 4:
  case 5:
  case 6:
  count++;
  break;
  //return count = 0;
  
  case 10:
  case "'J'":
  case "'Q'":
  case "'K'":
  case "'A'":
  count--;
  break;


}

if (count > 0) {
  return count + " Bet";
} else {
  return count + " Hold";
}
// Only change code above this line
}

console.log(cc(8));

cc(2); cc(3); cc(7); cc('K'); cc('A');

  **Información de tu navegador:**

El agente de usuario es: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.84 Safari/537.36

Desafío: Conteo de cartas

Enlaza al desafío:

First of all, screw the given solutions - a lot of them are wrong. Just ignore them.

Next, a good coder is a good debugger, and a good debugger is a good detective.

The first failing test is this:

So, I want to see what is happening, so I try it with this:

console.log(cc(10));
console.log(cc('J'));
console.log(cc('Q'));
console.log(cc('K'));
console.log(cc('A'));

which outputs:

0 Hold
-1 Hold
-1 Hold
-1 Hold
-1 Hold
-1 Hold

Is that what we expect? No. Why isn’t it decrementing for any of the face cards, J, Q, K, or A? What do they all have in common? They are all strings. When I look in your code, I see this:

  case 10:
  case "'J'":
  case "'Q'":
  case "'K'":
  case "'A'":
  count--;
  break;

Do you see an issue with how those strings are encoded?

When I fix that, your code passes for me.

Just for the heck of it, I tried the offered solutions. The first on passes. The second is lacking the declaration and initialization of the variable count. When I add that, it passes too. But again, don’t use the solutions. Some of them are based on old versions of the problem and some of them are just wrong or overly complicated.