Creates a list of menu items loaded from an array of menu items and their props.
I remembered how to load items to the DOM by using DOMConentLoaded. Then I created a function that returned html elements to display the items in an array. In order to filter the items I used a dataset and fliter method.
I had create a condition that checks if the category is all, if so call the fucntion I created and pass in the origianl array. If not call the same function and pass in the filtered array.
Since a created a method that loads the items, I deleted the intial item created in the index.
Try for...in instead of reduce to make an array of categories In the future I need to use an api and some backend coding to load the items.