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.
asked Nov 12, 2013 at 23:45
Deafsilver
471 gold badge2 silver badges9 bronze badges
1 Answer 1
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.
answered Nov 12, 2013 at 23:53
Guffa
703k112 gold badges760 silver badges1k bronze badges
Sign up to request clarification or add additional context in comments.
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. :)
lang-js
}for...else if (playerscore > dealerscore....