Quiz App with Score Tracking
đĄ Overview
A flexible project you can reuse for ANY subject's questions (this is actually similar to how ShikshaCS's own Quiz section works!) â great practice with arrays, state, and conditional rendering.
â Features to Build
0/4 doneđ§ Step-by-Step Guide
Store questions as an array of objects: {question, options, correctIndex}.
Display the current question's text and its 4 options as clickable buttons.
On selecting an option, compare it to correctIndex, update the score, and move to the next question.
When all questions are done, hide the quiz and show a 'You scored X/Y' results screen.
Bonus: add a 15-second countdown per question using setInterval, auto-advancing if time runs out.
đĄ Pro Tip
Keep the CURRENT question index in a single state variable and always derive what's shown FROM that index â trying to track 'which question am I on' with multiple separate variables gets buggy fast.