You’re accessing the price property of the objects in order to calculate the Total Cost, which is working. However, when you’re trying to print the name of the dish, you’re using the whole object instead of the name property
I misunderstood this:
const appitizer = this.getRandomDishFromCourse(‘appitizers’);
So the appitizers array is storing both the name of the dish and the price under one Index, both of which are being selected and stored in the appitizer const under generateRandomMeal, correct?
So since you are creating an object with name and price properties and then pushing the object to the array, the full object is returned when you use this.getRandomDishFromCourse('appitizers').
If you had added other properties to the object in your addDishToCourse() method, then they would also be available when you retrieve the object from the array.