Tell us what’s happening:
Your code so far
var count = 0;
function cc(card) {
// Only change code below this line
switch(card) {
case 2:
case 3:
case 4:
case 5:
count ++;
break;
}
if (count > 0) {
return count
}
// Only change code above this line
}
// Add/remove calls to test your function.
// Note: Only the last will display
cc(4);cc(5);
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/counting-cards