There is a list of categories: salads, appetizers, soups, in each category of 6 products, then there is a set of categories, contains 2 categories and, according to the condition, the set may contain a salad or a snack, and soup. Question: the user scored goods from these categories, and I know how many products each category he chose, I need to calculate the number of sets, plus the set may not be complete (for example, only the soup is selected). I'm trying to implement this thing in javascript
You need to go through all the items in the basket and get the number of sets, for example, a light set contains salad or snacks and soup. How to do it?