Code Monkey home page Code Monkey logo

metacodequiz's Introduction

MetaCodeQuiz


Functionality

In this program the user is prompted questions about programming. Traversing the DOM to insert code into our HTML.

Where to start?

To do/Needed.

  • Inititalize values

  • Populate HTML

  • make it dynamic-- maybe use .innerHTML to generate the next set of questions? Hmmm. Or what is a better way of doing it? research.

  • Timer in all pages (or the 1 page) at the top of page. How much time should they get. Per question or for the whole quiz? For the whole quiz would be easier.


            document.getElementById("timer").innerHTML =  hours + "h "+ minutes + "m " + seconds + "s ";

            still need end text i.e. innerhtml = "EXPIRED"

            should all answers after timer expire = false? create a variable that checks truthiness on answers

  • score counter if score = true then +1 to score. Maybe a for loop? we'll need a variable init for score else if score = false "execute.this"

  • High Score will need to be an array. We're going to append and/or add to the array of high scores. Hmmm maybe we should do an empty [] to start, then use shift or another array adder to start adding scores. We're going to do the two value-pairs:

initials & scoreValue

user input on initials. We'll need a user gui input. what is relevant js. include it here.

  • ~~~Develop at least 4 options to pick from on each question. math.floor(math.random +1) ????? we'll need a plus 1 and make it a range of 4 options. Does that mean 0-3 so that we have 4 total indexes? hmmmm. or 1-4 doesn't really matter~~

  • woff2 file added and ROBOTO font added. Waded through @font-face hell. Pretty cool.

Questions:

  1. If the dev wants to console log multiple object properties in the same console.log() '&&' does not work. How do we print multiple properties on the same line?

  2. ,

  3. andAlso

  4. || pipe it!

  5. &

  6. If a test-taker wanted to take "full-advantage" of their resources... In other words potentially cheat on this test how would they do it?

  7. Eliminate the most improbable answers then make an educated guess.

  8. Ask their instructor/mentor.

  9. Google it.

  10. Inspect ELement for class/id.

Cheating -- Revise Later

User can cheat by inspecting elements. If answer is called by class and other answers are called by something else--user can find the right answer without actually knowing it. Consider revising in the future.

Will closures reduce cheating? Research. can minify and obfuscate code to decrease readability--one option?

All valid questions. But instead I added an ID describing each answer. We'll go by id's rather than a "wrongId" and a "correctId".It'll be referenced in the JS rather than in the HTML. That'd help, right? Yes. Obfuscates it slightly.

metacodequiz's People

Contributors

camright 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.