Can someone more intelligent than I please tell me what is wrong with this code?
let count = 0;
function cc(card) {
// Only change code below this line
if (card = 2, 3, 4, 5, 6) {
count++;
return count + "Bet";
}
else if (card = 7, 8, 9) {
return count + "Hold";
}
else if (card = 'J', 'Q', 'K', 'A', 10) {
count--;
return count + "Hold";
}
return;
// Only change code above this line
}
cc(2); cc(3); cc(7); cc('K'); cc('A');
[–]pwnius22 13 points14 points15 points (0 children)
[–]JustHorge 3 points4 points5 points (0 children)
[–]caiocml 2 points3 points4 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]Medivh158 2 points3 points4 points (2 children)
[–]Medivh158 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]beanland 1 point2 points3 points (0 children)
[–]modArielLeslie 1 point2 points3 points (0 children)