Meal Maker Project

Ok, your first point about creating the empty arrays, I did that and it seems to be included in what I pasted here, so I’m not sure what you meant by an empty array. Are you supposed to put a space between the brackets when you do that? I don’t think I did and it appears to have translated to a checkbox when I pasted it into the mail program.

And if I understand your second direction correctly, you are saying that my first getters and setters for the course need to be included inside the _courses object that starts with the empty arrays? This seems to run contrary to what the video showed.

You can, but probably shouldn’t so it follows convention…

[] vs [ ]

As to the other point, getters and setters need to be in the same context as their related attributes.

// menu context
menu = {

}
// _courses context
menu = {
  _courses: {

  }
}
// dishes in _courses context
menu = {
  _courses: {
    _appetizers: [],
    _mains: [],
    _desserts: [],
    get ...() {

    },
    get ...() {

    },
    get ...() {

    },
    set ...() {

    },
    set ...() {

    },
    set ...() {

    },
  }
  get courses() {

  },
  // other menu related methods
}

All or most of the feedback I’m seeing here runs contradictory to both the instructions and the example shown in the exercise, and none of this stuff is working for me, either, especially since I’m new to JS and coding in general.

I guess I’ll need to move on to some other exercises and hope skipping this one doesn’t come back to haunt me. I didn’t encounter similar problems in the ‘Team Stats’ project, but then that was something of a different animal.

Thanks for your efforts. I’m sorry I’m not getting it.

1 Like

Hi there,

Would be grateful if you could please have a look at my code on the Javascript Workaround Project: Workaround Javascript Project

I’m struggling to understand why my code isn’t providing an output?

Many thanks

I know I am months too late for this reply and you posssibly found the solution yourself if you kept u coding in the meantime, but the most obvious error is that your appetizers, mains and desserts key all have an underscore in the beginning but nowhere else in your code. So none of the other references will work. Hope this helps (if not for yourself, then maybe for someone elsse who stubles onto this thread with a similar problem)