Обсуждение задания "Counting Cards"

Sep 29, 2022

Не много забежать вперед. Почему не сработал такой код? function cc(card) { // Only change code below this line

function result(value) { return value ? value + " bet" : value + " hold"; }

let positively = [2, 3, 4, 5, 6]; let negative = [10, "J", "Q", "K", "A"];

if (positively.includes(card)) { count++; return result(count);

} else if (negative.includes(card)) { count--;

return result(count); } return result(count);

// Only change code above this line }