Tell us what’s happening:
Describe your issue in detail here.
I don’t understand why count = count++ is not considered correct, only count++ is? Same goes for count = count-- vs count–
I thought they both represent the same thing? Your code so far
let count = 0;
function cc(card) {
// Only change code below this line
switch (card) {
case 2:
case 3:
case 4:
case 5:
case 6:
count = count++;
break;
case 7:
case 8:
case 9:
count = count;
break;
case 10:
case 'J':
case 'Q':
case 'K':
case 'A':
count = count--;
break;
}
if (count > 0) {
return count + " Bet";
} else {
return count + " Hold";
}
// Only change code above this line
}
cc(2); cc(3); cc(7); cc('K'); cc('A');
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15
Thanks for your reply. However I’m still confused…isn’t count++ an abbreviation for count + 1? In which case count = count + 1 is exactly the same as count = count++ (adding 1 to count → reassigning the new value to the count variable)??
Am I misunderstanding something??
Cheers