Fork of Svelte Starter: Quiz Template
This interactive quiz presents factual questions about humpback whales, with multiple-choice answers for each question. The Svelte application manages quiz logic, tracking the user’s score and progress through state and derived values, and it displays final results with a percentage and a restart option.
The user interface renders each question with styled answer buttons, using Svelte’s class directives to indicate selected, correct, and incorrect responses. The quiz uses event dispatching to handle user interactions, such as selecting an answer and advancing to the next question, while the data structure holds four whale-related questions. Feedback is given through color-coded buttons, and a results screen appears after the final question.