Giter Club home page Giter Club logo

code-quiz's Introduction

Javascript Quiz

Overview

The task is to create a dynamic quiz with javascript that gives real-time feedback if the answer is correct or incorrect. The quiz should loop through a list of questions within a certain amount of time. Each incorrect answer deducts time off the timer and the final time is the user's score. For example, if the time is up before the user completes the quiz, the score is 0. If the user has 15 seconds left, the score is 15.

The quiz allows the user to save high scores and view a list of previous high scores.

Steps

In HTML, I created empty sections for the questions, submission page, and the high score page. This is so I could dynamically create HTML with javascript.

In the javascript code, I created variables that pointed to each HTML section to needed to be created and I also created global variables that were going to be used in multiple functions.

I created the following functions:

  • Start timer
  • Start Quiz
  • Stop Quiz
  • Show Next Question
  • Check Answer
  • Save Scores
  • Get Scores
  • Show Scores

I also needed to create the following click events:

  • Start game
  • View high scores
  • Submit score
  • Clear scores
  • Go back

Links

GitHub GitHub Live Site

Example

Example

code-quiz's People

Contributors

kimberlyj227 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.