Skip to content

kkk #7673

Closed
maotao1 opened this Issue · 1 comment

3 participants

@maotao1

Challenge Counting Cards has an issue.
User Agent is: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0.
Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

var count = 0;

function cc(card) {
  // Only change code below this line
  switch (card) {
case 'J':
case 'Q':
case 'K':
case 'A':
case 10:
count--;
}
if (count < 7) {
count++;
}
if (count <= 0) {
return count + " Hold";
}else if (count > 0) {
return count + " Bet";
}

  // Only change code above this line
}

// Add/remove calls to test your function.
// Note: Only the last will display
cc(2); cc(3); cc(7); cc('K'); cc('A');
@niyasc

What is the error message you're getting?

@ltegman ltegman closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.