Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Faq accordion card solution

Yazdunā€¢ 1,310

@Yazdun

Desktop design screenshot for the FAQ accordion card coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hello to my fellow developers ! for this challenge, instead of hardcoding Q&A into the html, I created a data.js file which contains all the Q&As plus unique id for each of them, then I used map function in my script file to loop through data and generate html. I think It's easier to maintain the code and even add new questions in the future this way !

Also I tried a little bit of OOP in my Javascript, and I think I'm satisfied with the result.

Huge thanks to vanzasetia for his clean solution on this challenge ! šŸ‘Œ

I will be glad to know about your thoughts and feedbacks, and possible improvements on my solution

Community feedback

Please log in to post a comment

Log in with GitHub
Discord logo

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