Meal Maker issue

Hi everyone,

I also have a problem with the Meal Maker project.
When I run my code, I get this error:

addDishToCourse(courseName, dishName, dishPrice) {
^^^^^^^^^^^^^^^
SyntaxError: Unexpected identifier

I have watched the walkthrough videos, looked for similar forum posts and also for spelling errors, but can’t find anything.
Any help is greatly appreciated. :slight_smile:
This 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(appetizerIn) {

    this._courses.appetizers = appetizerIn;

  },

  set mains(mainIn) {

    this._courses.mains = mainIn;

  },

  set desserts(dessertIn) {

    this._courses.desserts = dessertIn;

  },

  get courses() {

    return {

      appetizers: this.appetizers,

      mains: this.mains, 

      desserts: this.desserts,

    }

  }

  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 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 is ${appetizer.name}, ${main.name}, ${dessert.name}. The price is €${totalPrice}.`;

 }

};

menu.addDishToCourse('appetizers', 'Garlic Bread', 3.50);

menu.addDishToCourse('appetizers', 'Olives', 2.95);

menu.addDishToCourse('appetizers', 'Mixed Salad', 4.10);

menu.addDishToCourse('mains', 'Vegetable Curry', 8.50);

menu.addDishToCourse('mains', 'Vegan Burger', 9.00);

menu.addDishToCourse('mains', 'Kässpätzle', 9.50);

menu.addDishToCourse('desserts', 'Raspberry Cheesecake', 4.25);

menu.addDishToCourse('desserts', 'Chocolate Bomb', 4.50);

menu.addDishToCourse('desserts', 'Donauwelle', 4.00);

const meal = menu.generateRandomMeal();

console.log(meal);

errors like this, always check the line above as well:

  } // here

  addDishToCourse(courseName, dishName, dishPrice) {

you forgot a comma to separate your property value pairs.

aaaah, I knew it must be something so small that it’s easy to oversee.
Thanks a mill!