FCC JS Counting Cards challenge won't accept my solution

I am completely unable to figure out why this code doesn’t pass all the FCC checks in the JavaScript Counting Cards challenge and I would like to know what I am missing.
Although there are other simpler ways to achieve the same result, I would like to know what is wrong with this way of doing it.
Thanks in advance.

Your code so far

var count = 0;

function cc(card) {
  // Only change code below this line
  var decision ;
  if (card===2 || card===3 || card===4 || card===5 || card===6){
    decision = "Bet";
  }else if(card===7 || card===8 || card===9){
    count += 0;
    decision = "Hold";
  }else if(card===10 || card==='J' || card==='Q' || card==='K' || card==='A'){
    decision = "Hold";
    count = undefined;
    decision = "none";
  return count+" "+decision;
  // Only change code above this line

// Add/remove calls to test your function.
// Note: Only the last will display
cc(2);  cc(3); cc(7); cc('K'); cc('A');

Your browser information:

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

Link to the challenge:

Your code should always return " Bet " when the count is positive.

You are basing the decision on the card passed in, instead you need to separate the logic of calculating count from the logic of the decision

The count should depend only on the card, the decision should depend only on count

Thanks, it makes sense now. I have separated them and the tests run successfully.