I'm writing a Blackjack program in Javascript and I'm having issues finding the error in my code. When I debug in Chrome it tells me when I click each of my buttons that the corresponding function is undefined. I can't seem to find the error so hopefully you all can! Thank you in advance.
1 Answer
That's because you have a syntax error in your code, so none of the code in the script tag is executed.
You are missing a closing } for the last if statement in the last function.
2 Comments
Deafsilver
Annnnnnnnd now I feel like an idiot. Thank you very much for that haha.
talemyn
We've all been there, @Deafsilver . . . sometimes you just need another pair of eyes to take a look. :)
}for...else if (playerscore > dealerscore....