I can't understand this code, counting card challenge

OK. So I resorted to the solution because there was no other way out of there.
What I don’t understand in this is why if (count > 0) return count + " Bet"
So how this seem to mean that any count upper than 0 will make the guy bet?
Please enlighten me.

OK I got it. Tell me if I’m wrong, it’s because the count to zero is the cards he can’t bet according to the diagram of cards, +1 will make him bet and -1 won’t.
Please tell me if this is the right explanation, thanks

it would be really useful if you included the challenge link

but to summarize challende instructions: first look at the value of card and change count accordingly, and after that, look at the value of count and return it followed with "Bet" if it’s positive or "Hold"if it’s zero or negative

1 Like

@ilenia Yes I’m sorry I’ll include that. You’re right though. I’ll keep on studying it anyways until a have a good grasp at it, Thanks

to answer your question, Yes, because that’s what the challenge asks for

1 Like

@ilenia I should read better and slower.