Coder Social home page Coder Social logo

javascript-quiz's Introduction

Javascript Quiz

Project "Javascript Quiz" is a quick quiz of up to several questions that is made through Javascript DOM manipulation. Site is responsive and will react to different screen widths (within limits). Site will also save high scores into localstorage and retrieve them as needed, with optional reset.

Project Repo

http://github.com/kschang77/javascript-quiz

Prerequisites

Any Javascript-capable browser

Installation

No installation required

Built With

Javascript

Code Snippet

    // read back the arrHighScores from local storage
    function retrieveHighScores() {
        var rawData = localStorage.highScores;
        // console.log(rawData);
        if (rawData != null) {
            var highScoresStored = JSON.parse(rawData);
            // console.log(highScoresStored)
            arrHighScores = [];
            for (var i = 0, len = highScoresStored.length; i< len ; i++) {
                var highScoreSingle = new Object();
                highScoreSingle.name = highScoresStored[i].name;
                highScoreSingle.seconds = highScoresStored[i].seconds;
                arrHighScores.push(highScoreSingle);
    //            console.log(highScoreSingle)
            } 
        }
        // console.log(arrHighScores)
    }

Screenshots

Title Screen and Start

One of the Questions

Potential enhancements

  • Random order of questions
  • Random order of answers
  • Sort High Score Table
  • Other cosmetic touches

Deployed Link

https://kschang77.github.io/javascript-quiz

Author

Kasey Chang

License

This project is licensed under the MIT License

Acknowledgments

  • Hat tip to Jerome, Kerwin, Mahi, and the UCBEx Coding Bootcamp March 2020 cohort

javascript-quiz's People

Contributors

kschang77 avatar

Watchers

 avatar

javascript-quiz's Issues

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.