Faq accordion card solution

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
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Yazdun'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