var count = 0;
function cc(card) {
// Only change code below this line
if (count > 1) {
return 2, 3, 4, 5, 6 + " Bet";
} else if (count == 0) {
return 7, 8, 9 + " Hold";
} else if (count < 0) {
return 10, 'J', 'Q', 'K', 'A' + " Hold";
}
return "Change Me";
// 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');
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36.
You’re taking a bit of a wrong approach. I recommend you look through this topic as I’ve already explained some things there, one of the users also had a problem with completing this challenge: