Design comparison
Solution retrospective
I'm proud of the work I've done on this mini app, but I have a question.
Was there an easier way of changing the data when a button is clicked ? I feel i may have over complicated things.
Thanks in advance !
Community feedback
- @sarahc-devPosted almost 3 years ago
Hey!
I also completed this challenge today. I have used one forEach() to loop through the JSON file and then used an if statement to update with the relevant data - rather than using a for loop on every element. Have a look at my solution, you may think it is an easier way (ignoring the additional complication of trying to animate it!)?
I like the way you have rendered the whole component using Javascript to make it more dynamic - I didn't think of doing that!
1
Please log in to post a comment
Log in with GitHubJoin 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