Tell us what’s happening:
Hey all! Hope you’re doing well, can’t seem to figure out why the below code isn’t working? Any and all help appreciated Thank you!
**Your code so far**
var count = 0;
function cc(card) {
// Only change code below this line
var checker = [10, "J", "Q", "K", "A"];
if (card > 1 && card < 7) {
count++;
}else if (checker.includes(card) == true){
count--;
}
if (count > 0) {
console.log(count + " Bet");
}else if (count <= 0) {
console.log(count + " Hold");
}
// 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/90.0.4430.212 Safari/537.36
Challenge: Counting Cards
Link to the challenge: