Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

118 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JavaScript Quiz

This website features a JavaScript quiz designed to provide users with an opportunity to test their knowledge of the basics of the programming language. The quiz aims to offer a learning experience by highlighting the correct answers in green, even when the user selects an incorrect option.

Are you ready for the challenge? JavaScript Quiz

Table of Content

Site Structure

User Experience UX

Site Structure:

The JavaScript Quiz is designed to test and engage users with 15 JavaScript-related questions. It features a homepage with an introduction and a start button, multiple-choice question cards, and results displayed at the end. The game promotes learning by highlighting correct and incorrect answers.

Back to top

Design Choices

Typography:

No custom fonts were imported for the quiz as it did not appear necessary. The site utilizes default fonts, which were deemed sufficient for the design.

Color Scheme:

The selected color scheme for the quiz features a blue background with an hsl(--hue) hue, complemented by white question boxes and answer buttons in the same color. This choice was made to maintain focus on the quiz content. The combination of white question boxes and blue buttons enhances the visual harmony with the background while capturing the user's attention effectively.

For a visual representation of the contrast, refer to the screenshot below:

Picture about colorscheme

Back to top

Features:

The quiz website consists of a homepage with a brief introduction and a start button to initiate the quiz. The main quiz section includes 15 multiple-choice questions, each displaying a question and four possible answers. The game provides immediate feedback by highlighting correct answers in green and incorrect ones in red. At the end of the quiz, the user receives a summary of correct and incorrect answers, along with a congratulatory message. If the user answers incorrectly three times, the quiz ends, and they have the option to retry or return to the homepage. The site also features a mute button for audio control and includes a replay option.

Back to top

Existing Features:

Home page:

The homepage comprises the game title, a concise introduction to the game and its rules, a start button for initiating the quiz, and a background image designed to pique curiosity about the quiz.

The screenshots below provide examples of how the homepage would appear on both a laptop and a smartphone.

Homepage on Laptop

Homepage on smartphone

Back to top

Question cards:

The question cards feature a clear and user-friendly design. Each card includes a well-formulated question, accompanied by four multiple-choice answers. The chosen color scheme ensures a visually cohesive experience, with white question boxes and hsl(--hue) blue answer buttons, blending seamlessly with the background.

The screenshots below illustrate these design elements on both a laptop and a smartphone for a comprehensive view.

Questioncard on Laptop

Questioncard smartphone

Back to top

Mute/unmute button:

The mute/unmute button serves as a crucial element for sound control within the quiz. Users can easily toggle between muted and unmuted states, providing them with the flexibility to customize their audio experience. This feature ensures a seamless and adjustable sound environment, catering to individual preferences.

The game sound is muted by default to enhance the user experience, as illustrated below:

Mute/unmute button

Back to top

Questioncard counter and progressbar:

The question card counter and progressbar keeps track of the answered questions, providing users with a visual representation of their progress and indicating how many questions remain. The screenshot below illustrates the counter:

Counter and progressbar

Score area:

The score area tallies both correct and incorrect answers, distinguishing them with green and red colors, respectively. This visual representation helps users monitor their performance throughout the quiz.

Score area

Back to top

Gamesound:

The game sound is carefully selected to evoke a classical quiz ambiance. Click on the icon below to experience it. Additionally, the correct and wrong sounds have been chosen to resemble typical quiz feedback, enhancing the overall quiz experience.

  • Gamesound:

  • Wrong answer sound:

  • Correct answer sound:

Back to top

Game over and Replay menu:

When player answered three times incorrectly an alert message plop up to inform the player the he lost the game, see below:

Game over message

followed by a replay menu where the Player can play again or quit:

Replay menu

Back to top

Results:

Upon completing the quiz, the result section appears, displaying the player's score along with a brief congratulatory message and a replay button:

Results

Future Features:

Potential future features include the addition of a submission form to personalize the game experience by getting players' names. Additionally, there could be a fireworks animation with sound effects in the results section, a countdown per question, the inclusion of jokers, an increased number of questions, the implementation of different difficulty levels, and a timer to measure the overall game duration.

Back to top

Technologies Used

  • HTML5: Provides the content and structure for the website.

  • CSS: Provides the styles for the website.

  • JavaScript: Provides the interactivity and dynamic behavior for the website.

  • Github: Used to host and manage the website's source code.

  • VS Code: Used as the code editor to write and edit the website's code.

Back to top

Testing

Please refer to here for more information on testing the JavaScript quiz.

Deployment

This site was depolyed to GitHub pages. The steps to deploy a site are shown below:

  1. In the GitHub Repository called Quiz-Game click on the Settings button on the Repoitory navigation menu.

  2. In Settings on the left side, go down to the Pages item and click on it.

  3. Make sure the Source item is set to: Deploy from a branch

  4. at the Branch item underneth the source item, set the branch to main and save it.

  5. Once you have selected the main branch, the page will automatically refresh to show a detailed ribbon display indicating that the deployment was successful. If the page does not refresh automatically, refresh it manually.

Screenshoot from Github deployment

Back to top

To get to the live link of the GitHub repository - click here: https://dfcmk.github.io/Quiz-Game/

To Fork the repository on GitHub:

Forking a GitHub repository creates a copy of the repository in your own GitHub account. You can view and modify the copy without affecting the original repository.

To fork a repository:

  1. Log in to GitHub and navigate to the repository you want to fork.
  2. Click the Fork button in the top-right corner of the page.
  3. Select a name for your forked repository.
  4. Click the Fork button to create the copy.

Once you have forked a repository, you can clone it to your local computer and start making changes. When you are ready to share your changes, you can create a pull request to the original repository.

Screenshoot from Github deployment

Back to top

To create a local clone of this project:

  1. Click the Code tab under the repository's name.
  2. Click the clipboard icon in the Clone with HTTPS section to copy the URL.

Screenshoot from Github deployment

Once you have copied the URL, you can use a Git client to clone the repository to your local computer. Here are the steps to clone a repository using Git Bash:

  1. Open Git Bash.
  2. Navigate to the directory where you want to clone the repository.
  3. Type the following command and press Enter:

git clone

Replace with the URL of the repository that you copied in step 2.

This will create a local clone of the repository in the current directory.

You also can create and name the directory where the clone should be saved in, with adding the directory name after the . So the full command would look like this: git clone XXXX(This is a directory name)

Back to top

Credits

Content:

Back to top

Media:

  • The audio files for Gamesound, Wrongsound, and Correctsound were obtained from pixaby

  • The background image on the homepage also came from pixaby

Back to top

Code:

Acknowledgements:

I extend my thanks to several individuals and communities who contributed to the completion of this project:

  • Precious Ijege, my dedicated mentor, for providing valuable guidance and support throughout the development process.

  • The entire Code Institute team, whose resources and expertise have been instrumental in my learning journey.

I choose to build a Quiz about JavaScript because i am new to this programming language and i thought it would be beneficial to incude the topic into the quiz so it would promote my learning.

Denes Kalnoky 2023.

Back to top

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages