Ill look at other examples in the forums too
Your code so far
var count = 0;
function cc(card) {
// Only change code below this line
switch(card){
case 2:count: count++, 'Bet';
break;
case 3:count:count++, 'Bet';
break;
case 4:count: count++, 'Bet';
break;
case 5:count: count++, 'Bet';
break;
case 6: count: count++, 'Bet';
break;
case 7:count: '0', 'Hold';
break;
case 8:count: '0', 'Hold';
break;
case 9: count: '0', 'Hold';
break;
case 10:count: 'count--', 'Hold';
break;
case 'J':count: 'count--', 'Hold';
break;
case 'Q'count: 'count--', 'Hold';
break;
case 'K'count: 'count--', 'Hold';
break;
case 'A':count: 'count--', 'Hold';
break;
}
return "";
// 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_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/counting-cards/