I don’t know if this is a big deal or not but it’s bothering me. I’ve done research here and elsewhere but can’t seem to find a definitive answer.
I’ve passed the challenge but I can’t get the console to show the result of the function that matches the string in the tests section? Does anyone else have this issue?
console.log(cc(2), cc(3), cc(4), cc(5), cc(6));
console.log(cc(7), cc(8), cc(9));
console.log(cc(10), cc(‘J’), cc(‘Q’), cc(‘K’), cc(‘A’));
console.log(cc(3), cc(7), cc(‘Q’), cc(8), cc(‘A’));
console.log(cc(2), cc(‘J’), cc(9), cc(2), cc(7));
console.log(cc(2), cc(2), cc(10));
console.log(cc(3), cc(2), cc(‘A’), cc(10), cc(‘K’));
It seems like I’m not getting a cumulative increment/decrement result.
This shows the following in my console:
1 Bet 2 Bet 3 Bet 4 Bet 5 Bet - instead of - "5 Bet"
5 Bet 5 Bet 5 Bet - instead of - "0 Hold"
4 Bet 3 Bet 2 Bet 1 Bet 0 Hold - instead of - "-5 Hold"
1 Bet 1 Bet 0 Hold 0 Hold -1 Hold - instead of - "-1 Hold"
0 Hold -1 Hold -1 Hold 0 Hold 0 Hold - instead of - "1 Bet"
1 Bet 2 Bet 1 Bet - instead of - "1 Bet"
2 Bet 3 Bet 2 Bet 1 Bet 0 Hold - instead of - "-1 Hold"
**Your browser information:**
User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14909.132.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36
Challenge: Basic JavaScript - Counting Cards
Link to the challenge: