Tell us what’s happening:
hello whats wrong with my code,i think i put the return inside the function
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