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 using array in JS

Lenzhy 10

@Lenzhy

Desktop design screenshot for the FAQ accordion coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


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

I am proud that I made my code concise and without repetition with array.

I don't have enough knowledge yet to have other option but will look into other solution

Change:

I found an other solution without using ID

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

My first code was way too long and there was a lot of repetition. I found the solution by looking into array.

Change:

I needed to learn how to navigate in the Dom

Community feedback

@Litheesh-kumar

Posted

Learn about Event Propagation, Event Delegation and DOM traversing. Gaining Knowledge from those can help you to write better code dynamically. Still your code looks like static(what if I added new Question, you need to make change in JS file right. It is not a better way to do) .Happy Coding✨.

Marked as helpful

1

Lenzhy 10

@Lenzhy

Posted

@Litheesh-kumar thank you a lot ! I will look into what you told me about and start again! 🔥

1

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