Meal Maker Project Error

Trying to fix this project but unable to locate the origin of the error. please help!

Meal Maker Project

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(appetizers) { this._courses.appetizers = appetizers; }, set mains(mains) { this._courses.mains = mains; }, set appetizers(desserts) { this._courses.desserts = desserts; }, get courses() { return this._courses }, addDishToCourse(courseName, dishName, dishPrice) { const dish = { name: dishName, price: dishPrice, }; return this._courses[courseName].push(dish); }, getRandomDishFromCourse(courseName) { const dishes = this._courses[courseName]; const randomIndex = Math.floor(Math.random() * dishes.length); return dishs[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 is ${appetizer.name}, ${main.name}, ${dessert.name}, and the total price is ${totalPrice}`; } }; menu.addDishToCourse('appetizers', 'edamame', 6.00); menu.addDishToCourse('appetizers', 'soup', 8.00); menu.addDishToCourse('appetizers', 'sushi', 9.00); menu.addDishToCourse('main', 'terriyaki chicken', 25.00); menu.addDishToCourse('main', 'pad thai', 21.00); menu.addDishToCourse('main', 'swordfish', 29.00); menu.addDishToCourse('dessert', 'creme brulee', 12.00); menu.addDishToCourse('dessert', 'matcha ice cream', 9.00); menu.addDishToCourse('dessert', 'cheesecake', 10.00); let meal = menu.generateRandomMeal(); console.log(meal);

below is the error I receive:

The problem is here:

menu.addDishToCourse('main', 'terriyaki chicken', 25.00);
menu.addDishToCourse('main', 'pad thai', 21.00);
menu.addDishToCourse('main', 'swordfish', 29.00);

menu.addDishToCourse('dessert', 'creme brulee', 12.00);
menu.addDishToCourse('dessert', 'matcha ice cream', 9.00);
menu.addDishToCourse('dessert', 'cheesecake', 10.00);

Here,
'main' should be 'mains'
'dessert' should be 'desserts'

you have to spell it with the s because that’s how you spelled it previously [in the menu object]
here:

  _courses: {
    appetizers: [],
    mains: [],
    desserts:[],
  },

and here:

  generateRandomMeal() {
    const appetizer = this.getRandomDishFromCourse('appetizers');
    const main = this.getRandomDishFromCourse('mains');
    const dessert = this.getRandomDishFromCourse('desserts');

thank you! fixed this along with a misspelled dishes in line 46 and the error has been resolved