Tell us what’s happening:
Count and string are not being returned. Why not?
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 += 1;
break;
case 7:
case 8:
case 9:
count += 0;
case 10:
case ‘J’:
case ‘Q’:
case ‘K’:
case ‘A’:
count -= 1;
break;
}
return count + (count > 0 ? " Bet" : " Hold");
}
cc(2); cc(3); cc(7); cc(‘K’); cc(‘A’);
**Your browser information:**
User Agent is: <code>Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0</code>
**Challenge:** Basic JavaScript - Counting Cards
**Link to the challenge:**
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/counting-cards
It’s hard to catch a break around here, and this proves it.
Thank you for helping me with that. I just remembered than line-by-line editors exist. I can’t remember the freemium one I use to use. Any recommendations.