Meal Maker won't run - no errors, only circling

JS Meal Maker project

I have been working on the Meal Maker for two days now. I even replaced my original code with the solution in the solution video, but it will not run. The save button keeps circling forever and ever, and nothing shows up on the console - no error message, nothing!

Here is my code. I also attached a screenshot of the continuously-circling Save button and lack of output on the console. Any help will be so greatly appreciated.

const menu = {
  _courses: {
    appetizers: [],
    mains: [],
    desserts: [],
  },  
    get appetizers() {
      return this._courses.appetizers;
    }, // end get appetizers
    set appetizers(appetizers) {
      this._courses.appetizers = appetizers;
    }, // end set appetizers
    get mains() {
      return this._courses.mains;
    }, // end get mains
    set mains(mains) {
      this._courses.mains = mains;
    }, // end set mains
    get desserts() {
      return this._courses.desserts;
    }, // end get desserts
    set desserts(desserts) {
      this._courses.desserts = desserts;
    }  // end set desserts
 // },  // end course
  get courses() {
    return {
      appetizers: this.appetizers,
      mains: this.mains,
      desserts: this.desserts
    };  // end return
  },  // end get courses
  addDishToCourse(courseName, dishName, dishPrice) {
    const dish = {
      name: dishName,
      price: dishPrice
      
    };  // end dish
    return this._courses[courseName].push(dish);
  },  // end addDishToCourse
  getRandomDishFromCourse(courseName) {
    const dishes = this._courses[courseName];
    const randomIndex = Math.floor(Math.random() * dishes.length);
    return dishes[randomIndex];
  },  // end getRandomDishFromCourse
  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}, and ${dessert.name}, and the total price is ${totalPrice}`;
  }  // end generateRandomMeal() 
}  // end menu

menu.addDishToCourse('appetizers', 'salad', 4.00);
menu.addDishToCourse('appetizers', 'wings', 4.50);
menu.addDishToCourse('appetizers', 'fries', 5.00);

menu.addDishToCourse('mains', 'steak', 10.25);
menu.addDishToCourse('mains', 'salmon', 7.75);
menu.addDishToCourse('mains', 'tofu', 11.20);

menu.addDishToCourse('desserts', 'ice cream', 3.00);
menu.addDishToCourse('desserts', 'coffee', 3.00);
menu.addDishToCourse('desserts', 'cake', 3.25);

const meal = menu.generateRandomMeal();
console.log(meal);

That’ll result in a syntax error. If codecademy refuses to behave you can at least run it locally on your own computer

1 Like

Guess what? I ran it in Chrome’s console and it did give me a syntax error, and guess what that syntax error was - a closing curly brace without a comma, hehe!