Most Expensive Groceries
This problem is worth 1 points. You may receive partial credit.
You are compiling a price checker for a grocery store. The grocery prices are as follows: butter: $1, eggs: $2, milk: $3, bread: $4, cheese: $5 First, create a function called costOfGroceries(groceries) which takes a single array of grocery items and returns the total cost. Then, write a function mostExpensiveGroceries(groceriesList) that takes in a 2-dimensional array of grocery items and returns the index of the sub-array with the highest cost. This problem is worth 7 points. It is possible to get partial points on this problem.