Basic JavaScript - Counting Cards

I’m trying to complete the counting cards challenge for the Blackjack game. I don’t understand what I’m doing wrong. I’ll appreciate it if you guys point out where this code is going wrong.
PS. I don’t want to use switch

let count = 0;

function cc(card) {
// Only change code below this line
if(1<card<7){
count+=1;
}else if (6<card<10) {
count += 0;
}else if(card==10 || card==="J" || card==="Q"  || card==="K"  || card==="A"){
count-= 1;
}

if (count<=0){
  return (count + " " + "Hold");
}else{
  return(count + " " +"Bet");
}
// Only change code above this line
}
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/103.0.0.0 Safari/537.36

Challenge: Basic JavaScript - Counting Cards

Link to the challenge:

you need to do two comparisons, that will not do what you want in JavaScript

Oh! right…
Thank’s for such a quick reply.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.