/Code-quiz

A timed quiz to see how much you really know about coding basics. HTML / CSS / JavaScript Specific.

Primary LanguageJavaScriptMIT LicenseMIT

Code-quiz

A timed quiz to see how much you really know about coding basics. HTML / CSS / JavaScript Specific.

The Project

This is a short quiz to see if you know your HTML / CSS / JavaScript basics. At 7 questions, it should take you less than one minute to complete, which is also your time limit! Use this as a quick test to see if you remember your basics!

The Quiz Page

Code Quiz

-----------------------------------------------------------------------------

Question Example

-----------------------------------------------------------------------------

End of Quiz

-----------------------------------------------------------------------------

Leaderboard Example

Click here to view the Quiz!

Code Utilized

This project was cronstructed using HTML, CSS, and JavaScript. JavaScript really dominates the code volume since this quiz is mostly logic and boolean checking.

What to Expect

When the Quiz is loaded:

  • The user will be greeted with a "start" button and a short introduction that outlines how the code operates.
  • Once "start" is clicked, the user is presented with a question and 4 answer choices.
  • If the user selects the correct option, 10 points are added to their score.
  • If the user selects the incorrect option, 10 seconds are deducted from the time limit.
  • If the time runs out, an alert is given to the user stating that the quiz is over and they are re-directed to enter their initials to record their score.
  • If the user answers all of the questions, the user is then promped to enter their initials to record their score.
  • Clicking the "view High Scores" button will bring the user to the leaderboard page where they can see previous scores.
  • If the user wants to reset the recorded scores, clicking the "Clear Scores" button will erase local memory and refresh the scores board.
  • If the user would like to play again, simply press the "Play again" button to re-start the quiz from question 1.
  • The "view High Scores" button is not viewable during the quiz to reduce distractions.

Lessons Learned

This project really dives in to how complex and integrated JavaScript can be. From creating elements within the script to logging information using JSON, this really helped expand my knowledge of the language. I will admit, this was quite challenging.