I could navigate to the next lesson even though the code is correct

Tell us what’s happening:

The code is correct. Still I am not able to navigate to the next script.

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:
    case 6:
    count++;
    break;
    case 10:
    case 'J':
    case 'Q':
    case 'K':
    case 'A':
    count --;
    break;
  }
    if (count>0)
    {return count + "Bet";}
    else 
    {return count + "Hold"}
}
// Add/remove calls to test your function.
// Note: Only the last will display
console.log(cc(3));
console.log(cc(7));
console.log(cc('Q'));
console.log(cc(8));
console.log(cc('A')); ""

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/counting-cards

Give a space between count and your string.

Thanks Buddy, That was quick and it did work… You are a Star…

For future reference, you don’t have to complete challenges in order, you can go to Curriculum in the menu at the top and go to any challenge you want and complete that one