I made a 5 question quiz!

I completed another challenge project in Treehouse’s JavaScript Basics course. This project was to make a simple quiz.

I used prompts to ask questions, if statements to check that their answers matched mine, and alerts to display the user’s current score.

I love that this was a small project — it was small enough that I could embellish it, and overachieve rather than underachieve.

I used the .toUpperCase() method to make sure that “juLy” was accepted as correct, just like “July” or “july” would be. And I used the || or operator to allow multiple answers to the whippet question, which I just had fun with.

I really enjoyed this little project and I hope you enjoy taking the quiz! See it on CodePen or GitHub.

Leave a Reply

Your email address will not be published. Required fields are marked *