Giter Club home page Giter Club logo

api_datafetching_js's Introduction

CSQ'z

Fetches questions from a public API and renders them on the page using JavaScript. The game allows you to select answers and keeps track of your score. The project utilizes async/await for retrieving data from the API and DOM manipulation for rendering questions and answers.

Installation

  1. To run the quiz game locally, follow these steps:
https://github.com/AnamolZ/API_DataFetching_JS.git
  1. Navigate to the project directory:
cd API_DataFetching_JS-main
  1. Open the index.html file in your preferred web browser.

Usage

  1. The quiz game will automatically fetch a CS-related question from a public API and display it on the page.
  2. Read the question carefully and choose the correct answer among the provided options.
  3. Click on the chosen answer to submit your selection.
  4. The game will display whether your answer was correct or incorrect. The correct answer will be highlighted.
  5. The score will be updated accordingly, with each correct answer contributing to your total score.
  6. The game will continue to the next question automatically.
  7. After answering 10 questions, the game will display your final score.

Features

  • Fetches CS-related questions from a public API.
  • Renders questions, answers, and score on the page using DOM manipulation.
  • Tracks the number of correct answers and displays the final score.
  • Utilizes async/await for asynchronous data retrieval.
  • Utilizes event listeners to handle button clicks.
  • Utilizes destructuring for extracting relevant data from API response.

API Used

This project fetches questions from the Open Trivia Database, specifically the following API endpoint:

Contributing

If you would like to contribute to the quiz game, please follow these steps:

  1. Fork the repository.
  2. Create a new branch:
 git checkout -b feature/your-feature
  1. Make your changes and commit them:
 git commit -m 'Add your feature'
  1. Push to the branch:
git push origin feature/your-feature
  1. Create a pull request on GitHub.

Acknowledgements

Open Trivia Database for providing the API used in this project.

api_datafetching_js's People

Contributors

anamolz avatar

Watchers

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