Hi guys,
I’ve got a partial solution to this but I’m still missing two check boxes out of the seven I need - and I’ve no idea why this isn’t working.
Additionally, a comment for FCC - the question doesn’t make it clear at all that there’s already some background code for feeding in the inputs in sequence… I can’t imagine how many folk have become bogged down trying to figure out how to create a loop to update the global “count” value…! Perhaps some clarity is required in the question.
My code so far is below; any hints on why this isn’t giving me a solution?? :-
var count = 0;
function cc(card) {
// Only change code below this line
switch (card) {
case 2:
case 3:
case 4:
case 5:
case 6:
count ++;
var decision = " Bet";
break;
case 7:
case 8:
case 9:
decision = " Hold";
break;
case 10:
case 'J':
case 'Q':
case 'K':
case 'A':
count --;
decision = " Hold";
break;
}
return count + decision;
// 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('Q');