Can somebody tell me what is wrong with my code?
after I run the code it shows I have a lot of mistakes. I do not see any.
Thank you.
let count = 0;
function cc(card) {
// Only change code below this line
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;
}
if (count > 0)
{
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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36
I see the lines like this one: Cards Sequence 2, 3, 4, 5, 6 should return the string 5 Bet
But I do not see any mistakes in my code. What am I doing wrong?
i see two problem here, you already returning all of the possibilities but then you returning the count value again, and the second problem is space You must leave a space between the number and the string
It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.
We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.