Tell us what’s happening:
Hello,i need help,what’s wrong with my code?
thanks
Your code so far
let count = 0
function cardCounter (card) {
if (card >= 2 && card <= 6) {
count ++}
} else if (card === 10 || card === "J"
|| card === "Q" || card === "K" || card === "A") {count --}
}
if (count > 0) {
return count + " Bet";
} else {
return count + " Hold";
}
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36
Challenge Information:
Build a Card Counting Assistant - Build a Card Counting Assistant