I watched the video and copy + pasted the answer that he typed and its not working.
Disclaimer I have absolutely no idea whats going on with this
Your code so far
let count = 0;
function cc(card) {
// Only change code below this line
switch(card) {
case 2:
case 3:
case 4:
case 5:
case 6:
count++;
break;
case 10:
case “J”:
case “Q”:
case “K”:
case “A”:
count--;
break;
}
var holdbet = “Hold”
if (count > 0) {
holdbet = “Bet”}
return count + “ “ + “holdbet”;
// Only change code above this line
}
cc(2); cc(3); cc(7); cc('K'); cc('A');
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36
okay that is an interesting strategy.
Are you posting because you want to see a check-mark or are you posting because you want to learn something about javascript?
If the first case, please google the answer, I’m sure you can find one somewhere just so you can say you have done it.
If you want to learn to code, please go back to the exercise, erase everything you copied, and try yourself.
You can also ask us to explain something you have read if that is something you need.
why even reply at that point? of course im just looking for the answer. Im going to end up learning all this through exercises in the future. If youre going to just try and troll peoples’ posts, just log onto twitter.