Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMichael Arends
27,513 PointsFeedback on my Blackjack Code
Hello!
I created a blackjack game using only javascript, html, and css. I decided to start this project to practice prototypal inheritance. I am looking for feedback on my coding. How would you clean this up? How would you structure it differently? Did you find any bugs?
I am still trying to figure out how to write cleaner code. I assume this code is not the most readable and I apologize.
Thank you for any help! Here is the JSFiddle of the project. https://jsfiddle.net/mikeonthejob/jkycmv60/2/
Also, I have not started the code for splitting your cards. I still need to figure out how to add that without a code rewrite...however, that may be the only option.
Note: My local machine has images loading for the face cards. I could not find a way to load that resource into JS Fiddle.
2 Answers
Jonathan Grieve
Treehouse Moderator 91,253 PointsYou've done a great job :)
Structurally the code is very clean and clear so don't worry too much about about clarity. No real bugs that i can see.
You've made quite an addictive game which must have taken a lot of work! :D
Ryan Carson
23,287 PointsGreat hustle Michael. Thanks for being a Treehouse Student!
Cheers, Ryan
Michael Arends
27,513 Pointsthanks!
Michael Arends
27,513 PointsMichael Arends
27,513 PointsThanks!