A timed cricket trivia quiz built with vanilla HTML, CSS and JavaScript.
π Live Demo
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.
- 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
setIntervalandclearIntervalfor timer logicquerySelectorAllto manipulate multiple DOM elements at onceforEachon DOM elements- Global vs local variable scope (the hard way π )
- Game state management using index tracking
- Dynamic element creation and event handling
- HTML
- CSS
- JavaScript (vanilla, no frameworks)
git clone https://github.com/Subham269/cricket-quiz-app.git
cd cricket-quiz-app
# open index.html in your browserBuilt by Subham | https://github.com/Subham269
Built as part of my self-taught JavaScript learning journey β 2nd semester CSE student.