You commented out correct code, and replaced it with incorrect code:
After deleting the incorrect code, and running your correct code, the error I see is:
TypeError: Cannot read property ‘price’ of undefined
It refers to this line:
const totalPrice = appetizer.price + main.price + dessert.price;
So why is appetizer
undefined?
Hint
You haven’t added any dishes. You need to use the menu.addDishToCourse()
method a few times to have dishes to choose from.