Build a Card Counting Assistant - Build a Card Counting Assistant

Tell us what’s happening:

I feel like I don’t understand this lab at all. What am I missing?

Your code so far

let count = 0;
let card;
function cc(card) {
  if (card===2||card===3,card===4||card===5||card===6) {
  return (count+1);}
  else if (card===7||card===8||card===9) {
  return (count+0);}
  else if (card===10||card==="J"||card==="Q",card==="K"||card==="A") {
    return (count-1);}  
    if (count>=2 && count<=6) {return (console.log(count + " Bet"))} 
    else if (count<=0){
      return (console.log(count + " Hold"))
    }  
}

Your browser information:

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

Challenge Information:

Build a Card Counting Assistant - Build a Card Counting Assistant

The lab is asking you to do two different things. You are mixing them together.

Can you identify the two separate things you are being asked to do?

it wants me to assign each card a value then return a string based on that value

Those two tasks need to be done separately, not together as you are doing it.

I’m afraid I still don’t understand.

First update the count.

Then figure out what you want to return.

Don’t try to do both at the same time