
Hosted Project
JavaScript Coin Toss Game (Hosted on Github Pages)
Source Files
https://github.com/JS-Beginners/coin-toss-game-2 (Hosted on Github)
Project Objective
The objective of this JavaScript coin toss game project is to code a game that determines the winner at 5 correct guesses.
JavaScript Used
- DOM manipulations
- conditionals
- eventListners
- game logic
- CSS style manipulations
- functions
My Personalize Summary
Today's project is about 80% more work than the coin toss game the instructor presented in his course.
I could have simply coded what he provided, but I felt I needed to step it up a bit since I had the time and this was a game that I wanted to be proud to share.
This is what his game's functional final product looked like:

As you can see, my final project is radically different than the final project you see above.
I added a total score logic that selects a winner after 5 points, and I also made sure I created logic for conditions in the even the computer and the player ties the game.
New Things Learned or Refreshed
I probably could have learned some new JavaScript if I watched the video solution, but I did not.
Like I stated above, I decided to take the instructor's game to the extreme, which is why I also tagged this project as an intermediate JavaScript project. I actually wanted to create something all by myself that I would be proud of.
But, this is definitely a beginner project if you don't add all the transitions, scoring logic up to 5, and the images. That stuff was optional. ๐
Once you get to the point when you can do the same, though, you should definitely add your own flare to your projects.
Happy coding!
Time to Code
This project took me about 2 hours to code, including the HTML and CSS.
Your Turn!
What To Accomplish
- Download the source code from the github repository above.
- Delete the contents of the
app.js
file. - Implement the JavaScript code in your own
app.js file.
- If you think you need to see a video solution first, be sure to pick up Laurence's Svekis' Monster JavaScript course .
- Add a link to your finished project below!
What You Should See
Visit the hosted github page to see this JavaScript Coin Toss Game in action.
Leave a Reply