This counting cards program isn't working P.S it is working well in console

var count=0;
function cc(card) {
  let arr=[2,3,4,5,6];
  let arr1 = [10,"J","Q","K","A"];
  
  let A='';
  let B='';
  if(arr.includes(card))
  {
    count++;
  }
  else if(arr1.includes(card))
  {
    count--;
  }

  if(count>0)
  {
    return count + " Bet";
  }
  else
  {
    return count + " Hold";
  }
}

I’ve edited your post for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

markdown_Forums

Also, since your code does actually pass all the tests, it has been blurred out so not to spoil the solution for someone who is not yet ready to see a solution.

If you can not get the tests to pass, you can try refreshing the page and/or trying a different browser. Be aware that FCC works best when using the Chrome browser.