Solution not working on the Counting Cards javascript problem

Tell us what’s happening:
Describe your issue in detail here.
When i type i the code it doesn’t work.
The code seems identical to the solution in the ‘Get a hint’ link. but it doesn’t work and i cant figure out why please help me understand what is going on. Is it broken or am i doing someting wrong.
Your code so far

let count = 0;

function cc(card) {
// Only change code below this line
switch (card) {
case 2:
case 3:
case 4:
case 5:
case 6:
case 10:
case 'J':
case 'Q':
case "K":
case 'A':
  return count+'Bet';
} else {
  return count+'Hold';

return count;
// 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 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0

Challenge: Counting Cards

Link to the challenge:

Never mind. i figured it out . I needed space after the first quote mark in the strings ’ Bet’ and ’ Hold’.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.