Skip to content

Latest commit

Β 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏏 Cricket Quiz App

A timed cricket trivia quiz built with vanilla HTML, CSS and JavaScript.

πŸ”— Live Demo


About

A 10-question cricket quiz that tests your knowledge of cricket history, records and legendary moments. Each question has a 30-second timer β€” answer before time runs out or the quiz moves on automatically.


Features

  • 10 hand-picked cricket trivia questions
  • 30 second countdown timer per question
  • Instant visual feedback β€” green for correct, red for wrong
  • Score tracked throughout the quiz
  • Auto-advances when timer runs out
  • Restart button to play again

What I Learned Building This

  • setInterval and clearInterval for timer logic
  • querySelectorAll to manipulate multiple DOM elements at once
  • forEach on DOM elements
  • Global vs local variable scope (the hard way πŸ˜…)
  • Game state management using index tracking
  • Dynamic element creation and event handling

Tech Stack

  • HTML
  • CSS
  • JavaScript (vanilla, no frameworks)

How to Run Locally

git clone https://github.com/Subham269/cricket-quiz-app.git
cd cricket-quiz-app
# open index.html in your browser

Built by Subham | https://github.com/Subham269

Built as part of my self-taught JavaScript learning journey β€” 2nd semester CSE student.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages