Basic JavaScript: Counting Cards Help?

no, you don’t say that you hold because you have a J

the J change count by -1

then you check count, if count is positive you bet, if it is 0 or negative you hold

so, if counts start at 9, then you get a J, it means that count is now 8, and you bet

if counts start at 1, then you get a J, it means that count is now 0, and you hold

Hey Jordan,

I think this is the challenging part of the lesson.

This lesson has two parts:

  1. We have a series of cards, e.g. 2, J, 9, 2, 7. Depending on each of these cards we increase, decrease or hold the current count. These calculations are all done in the switch statement.
  2. After we did all the changes for the count, we decide if we return the count plus Hold or count plus Bet, depending on count from #1. This is only one value, depending of the accumulation of all previous steps from #1. This is done in the if statement.

if you have a 10, “A”, “J”, “K”, or “Q”, count should be decreased by one