Counting Cards i dont know what the problem is

var count = 0;

function cc(card) {
// Only change code below this line
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:

case 10:
case ‘J’:
case ‘Q’:
case ‘K’:
case ‘A’:
var x=(+count+" “+cout(count)+” ");
return x;

function cout(cot){
{return “Bet”;}
else {return “Hold”;}}

cc(2); cc(3); cc(4); cc(5); cc(10);

**Your browser information:**

User Agent is: <code>Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36</code>.

**Link to the challenge:**

i dont really understand that can you explain it ?i have+count+ to put it into the sentence not to add it somewhere does the machine understand it differently?

You aren’t wrong that you want to use count as a string, rather than add to it as a number – so how about using count.toString()? Also, you may want to be careful about that trailing space, it will fail you.

var x = count.toString()+" "+cout(count);
1 Like

You are right, ignore my previous message

Yes you are right i will try not to use them in the future…Thank you that was the issue!!

Glad I was able to help. Best of luck!