Here is the issue at hand: https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/counting-cards
I'm facing a problem while attempting to achieve 0 Hold in the return by using the Cards Sequence 7, 8, 9. I am aware that there are other ways to solve this problem, but I would like to stick to this approach. Can anyone offer some assistance?
function cc(card) {
// Only change code below this line
if (card = ( 2 || 3 || 4 || 5 || 6 )) {
count += 1;
}
else if (card = ( 7 || 8 || 9 )) {
count += 0;
}
else if (card = ( 10 || "J" || "Q"|| "K" || "A" )) {
count -= 1;
}
if (count <= 0) {
return count + " Hold";
}
else if (count > 0) {
return count + " Bet";
}
// Only change code above this line
}
cc(2); cc(3); cc(7); cc('K'); cc('A');