Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 7 days ago

Frontend Quiz App with SCSS and JavaScript

vite, sass/scss
P
JiaHe35354•240
@JiaHe35354
A solution to the Frontend Quiz app challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

I’m proud of making an accessible light/dark theme toggle. The icons change color depending on the theme, and the app adapts to the system’s default color scheme using window.matchMedia("(prefers-color-scheme: dark)"). It also remembers the user’s last selected theme through localStorage, which makes the experience more consistent.

Next time, I’d like to challenge myself with a more complex project. I feel confident about handling a theme toggle now, and I think working on something bigger will push me to improve further.

What challenges did you encounter, and how did you overcome them?

The quiz logic was the most challenging part. I needed to find the correct quiz when a subject was selected on the home page, so I created a startQuiz function with a subject parameter to load the right quiz. From there, I had to display the first question and its answers, starting with currentQuestionIndex = 0.

Each time the user selects an answer and clicks the submit button, the app checks if the answer is correct, shows the feedback, then increments the currentQuestionIndex to load the next question. This continues until all questions are finished. Breaking the problem into smaller steps like this helped me build the logic successfully.

What specific areas of your project would you like help with?

I’d like to improve the structure of my SCSS files. Right now, they work, but I don’t think they’re very well organized. I want to learn better ways to structure and maintain styles for larger projects.

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on JiaHe35354's solution.

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License