Meal maker

why do i keep getting this error?
TypeError: this._courses[courseName].push is not a function at Object.addDishToCourse

i originally used the .push() method without the setter method but when i try to test the same thing by assigning the same value with my setter method, it gives me this error. here is my code.

const menu = { _courses: { appetizers: [], mains: [], desserts: [] }, get appetizers() { return this._courses.appetizers; }, get mains() { return this._courses.mains; }, get desserts() { return this._courses.desserts; }, set appetizers(appetizer) { this._courses.appetizers = appetizer; }, set mains(main) { this._courses.mains = main; }, set desserts(dessert) { this._courses.desserts = dessert; }, get courses() { return { appetizers: this.appetizers, mains: this.mains, desserts: this.desserts }; }, addDishToCourse(courseName, dishName, dishPrice) { const dish = { name: dishName, price: dishPrice }; this[courseName] = this._courses[courseName].push(dish); //this[courseName].push(dish); }, getRandomDishFromCourse(courseName) { const dishes = this[courseName]; const randomIndex = Math.floor(Math.random() * this[courseName].length); return dishes[randomIndex]; }, generateRandomMeal() { const appetizer = this.getRandomDishFromCourse('appetizers'); const main = this.getRandomDishFromCourse('mains'); const dessert = this.getRandomDishFromCourse('desserts'); const totalPrice = appetizer.price + main.price + dessert.price; return `Your meal consist of the following 3 courses ${appetizer.name}, ${main.name} and ${dessert.name}. Your total bill comes to N${totalPrice}.`; } }; menu.addDishToCourse('appetizers', 'Shrimp Cocktail', 5000); menu.addDishToCourse('appetizers', 'Mushroom Soup', 400); menu.addDishToCourse('appetizers', 'Small chops', 300); menu.addDishToCourse('mains', 'Fried rice with Chicken', 1500); menu.addDishToCourse('mains', 'Jollof rice with Chicken', 1450); menu.addDishToCourse('mains', 'Salmon and mash potatoes', 2000); menu.addDishToCourse('desserts', 'Chocolate cake', 100); menu.addDishToCourse('desserts', 'Vanilla Volcano', 2500); menu.addDishToCourse('desserts', 'Passion Fruit Sorbet', 1200); const meal = menu.generateRandomMeal(); console.log(meal);

the first step of debugging could be logging:

  addDishToCourse(courseName, dishName, dishPrice) {
    const dish = {
      name: dishName,
      price: dishPrice
    };
    console.log(this._courses, courseName);
    this[courseName] = this._courses[courseName].push(dish);
    //this[courseName].push(dish);
  },

the problem seems this line:

    this[courseName] = this._courses[courseName].push(dish);

you overwrite the property which has an array value:

appetizers: [],

with the return value of .push():

appetizers: 1,

.push() return the amount of elements in the array