Please visit my completed webpage at: https://dvicj.github.io/Code-Quiz/
Hello, and welcome to my README! This is for my Week 4 Challenge, which was to create a javascript quiz. I learned a lot while doing this, and I am happy to be able to share my experience with you.
It was my job to ensure my javascript quiz had the following features:
- when the user clicks the start button then the quiz and timer are started
- when the user has answered one question, they are able to advance to the next question
- when the user has answered all of the questions that are able to submit their name and it is saved in localStorage along with their score
I was to create this portfolio, and meet all of the requirements listed above, by using:
- HTML
- CSS
- JavaScript
- Web APIs
I completed this project as I wanted to be able to complete a simple quiz that would test my knowledge of JavaScript by coming up with questions and answers, and also using the fundamentals I have learned.
It is important that I am able to showcase what I can do in an interactive and meaningful way.
Features:
There is no installation required. All files must remain in the position in which they are saved to ensure that all links, styles and photos function properly.
Below are examples of the links for the CSS style sheet and the images used in this webpage.
Here are some user experience highlights from my page:
- when the user clicks on the "START QUIZ" button, a welcome message pops up with the option to Start the quiz or Exit. When the user clicks "EXIT" the page will reload.
- when the user chooses to start the quiz, then the question will be presented to them. The user has 12 seconds to answer the question. Once they chose their answer, it will highlight green if correct, or red if incorrect. The user can then click on the "NEXT" button to be brought to the next question.
- when the quiz is completed the user will get a message telling them their score and the option to "Save". If they chose to save their score, the browser will prompt the user for their name. Once inputted, the "Score" page will update with the user's name and score. This information is saved to local storage.
These are some sources I used to help me along:
-
I got ideas for my questions here:
- [JavaScript W3 Schools](https://www.w3schools.com/js/js_intro.asp) -
Examples I referenced while working:
- [How to make a simple JavaScript quiz](https://simplestepscode.com/javascript-quiz-tutorial/)
Here are the highlights of what I learned and issues I had while writing this code.
-
I realized I do not utilize GitHub enough. I have a hard time remembering to save my progress. This became an issue with a style that I applied to CSS caused an error in my design and I didn't have an older version to go back to and compare. I had to spend some time trying to figure out what had went wrong.
-
I'm still having a hard time with parameters of functions and what they can accomplish.
-
I worry that I have to many variables and lines of code. I think I often make things much more complicated than they need to be. I have started taking scheduled breaks so I can come back to my work and look at it objectively.
MIT License
Copyright (c) 2020 Devin Jones
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.