Giter Site home page Giter Site logo

code-quiz's Introduction

Purpose

Take a timed quiz to test your basic knowledge of coding. Saves your top 5 scores!

Rules

  • You start with 75 seconds on the timer
  • When the timer reaches 0, the quiz ends
  • Each incorrect answer subtracts 10 seconds from the timer
  • Your score is equal to the time you have left at the end!

Web Application

Click here to view

example.mp4

Developed Using

  • JavaScript
  • HTML
  • CSS

by Alex Glaubitz

code-quiz's People

Contributors

qlaub avatar

Watchers

 avatar

code-quiz's Issues

Code Refactor

Clean up code

Condense similar CSS elements

Most of the pages have a similar look, try to make the CSS file smaller by not reusing code.

Element creation

When creating elements, they are sometimes given a class and ID. The class could most of the time be omitted since every dynamically created element is a one-of and EventListener seems to play nicer with ID's.

Function order

Function order is random at the moment, perhaps put it into order of usual flow of events for a user.

Random Answer Order

Current behavior

Answer buttons are displayed in the same order every time the question is generated

Future behavior

Answers are in randomized order every time

Display 'Correct' or 'Incorrect'

Functionality

Let user know the status of their last question answered. Should show under next question for two seconds. Display final question status during end game screen as well.

Page Generator Function

Function that takes an array of objects as input and creates an HTML section.

Aspects:

  • Each object is an HTML element.
  • Iterates through array, creates each element piece by piece.
  • Objects have the element, class, id, text, and eventListener keys.
  • For now all can be optional. Each object is an HTML element.
  • Can take Objects within objects (parent child relation in html structure).

Example of an object within the array being passed as an argument into the function:

`const exampleObject {

  element: 'button',
  class: 'start-btn',
  id: 'start-game',
  text: 'Submit',
  eventListener: ['click', 'newQuestion']
}`

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.