
Design comparison
Solution retrospective
Accessing data file using the fetch() method and using JavaScript to manipulate HTML elements in order to display the data retrieved from the json file.
What challenges did you encounter, and how did you overcome them?I was unable to grab the button data in a function that was created to display the json file data at first. I then created 2 functions specifically to grab the 2 different button data needed for the display. I also have 3 event listeners for the 3 buttons. Everything worked out fine but the JavaScript is a bit long. My final solution is to first grab all the buttons in an array and use the forEach() method to apply all the operations. The file is much shorter now.
What specific areas of your project would you like help with?all feedback is welcome!
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