https://github.com/mstephen19/codequiz
Test your JavaScript knowledge with this 20 question code quiz, including a highscores section. Berkeley Bootcamps homework assignment.
https://github.com/mstephen19/codequiz
css javascript
Last synced: about 2 months ago
JSON representation
Test your JavaScript knowledge with this 20 question code quiz, including a highscores section. Berkeley Bootcamps homework assignment.
- Host: GitHub
- URL: https://github.com/mstephen19/codequiz
- Owner: mstephen19
- Created: 2021-09-24T20:09:06.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-28T22:01:54.000Z (over 3 years ago)
- Last Synced: 2025-02-04T22:14:34.409Z (4 months ago)
- Topics: css, javascript
- Language: JavaScript
- Homepage: https://mstephen19.github.io/codeQuiz/
- Size: 684 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Code Quiz **([Link](https://mstephen19.github.io/codeQuiz/))**
This is a timed 20 question JavaScript quiz, in which the user is rewarded with time upon correctly answering a question, and is docked time upon incorrectly answering a question. Upon completion, the user can locally save their highscores, along with their name.

## Built With
* [HTML](https://developer.mozilla.org/en-US/docs/Web/HTML)
* [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS)
* [Javascript](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
* [ColorHunt](https://colorhunt.co/palette/fef1e6f9d5a7ffb08590aacb) (for color pallete)
* [Meyer Web reset.css file](https://meyerweb.com/eric/tools/css/reset/)## Notable Stuff
### Javascript logic used to switch between questions
This project is utilizing an array of objects. Each object is a question.
``` Javascript
function loadQuizItems() {
document.getElementById("viewHighscores").style.display = "none";
startScreen.style.display = "none";
quizBox.style.display = "flex";
questionElement.textContent = theQuiz[questionIndex].question;
for (let i = 0; i <= 3; i++) {
answersElements.children[i].children[0].textContent =
theQuiz[questionIndex].answers[i];
}
}
```## Deployed Link
* [Live Site Here](https://mstephen19.github.io/codeQuiz/)
## Author
**Matt Stephens**
- [Link to Portfolio Site](https://mstephen19.github.io)
- [Link to Github](https://github.com/mstephen19)
- [Link to LinkedIn](https://www.linkedin.com/mstephen19)### Acknowledgments
* Shoutout to [Jesse Lewis](https://www.linkedin.com/in/jesseaustinlewis/) for helping me out briefly with localStorage