Skip to content

iorellana21/code-quiz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code Quiz Challenge

Description

Coding Quiz Challenge application where user goes through multiple choice questions before timer runs out. Incorrect answers will deduct timer by 5 seconds. At the end, user inputs initials and a score table appears - displaying user initials and users score.

What Was Done

  • Build HTML page with different templates
  • Build CS page
  • Build JS page
  • Have questions, choices and correct answer contained within an array of objects
  • Create multiple functions
    • startQuiz()
      • Timer and quiz starts
    • showQuestions()
      • display questions and choices; incremet score or decrement timer depending on user selection
    • highScores()
      • store user initials and redirect to scores page
    • viewHighScores()
      • button to redirect to scores page
    • backToMainPage
      • button to return to main page
  • Use localStorage

Process

User can click 'View Scores' button or 'Start Quiz' button.

  • View Scores

    • Redirects user to the scores page
  • Start Quiz button:

    1. Timer/Quiz starts
    2. First question appears, waits for user selection
      • if user chooses correct, score will increase by 1
      • if user chooses incorrect, score does not increase, timer is deducted by 5 seconds
    3. Quiz continues timer reaches 0 or all questions have been asked
    4. User score is shown on the page and ask for user initials
    5. List of all users and their scores display on the page
    6. Can click Return to Main Page button to start again

Main Page

alt text

Questions Page

alt text

User initials Page

alt text

Score Page

alt text


Credits


Links

Live URL

GitHub URL