Meal maker: what about the setters?

I have a working solution, this is a more general question.

https://www.codecademy.com/paths/build-web-apps-with-react/tracks/bwa-javascript-iterators-objects-and-classes/modules/learn-javascript-objects/projects/meal-maker

I just finished a few hours on the meal maker exercise.

I ended up watching the walk through video and realised, THE SETTERS ARE NOT BEING USED in the official solution. Neither is the global courses getter.

I was struggling because I was trying to use the setters, and I still find no way of making it work by actually using the setters they ask to define in step 4.

Are they just dead code? Am I missing something??

.

1 Like

No. You’re not missing anything. Many learners have brought this up. Hopefully someday, they’ll modify this project to either use the setters or just leave them out. Happy coding!

3 Likes

Thank you for posting this! I thought the setters were being used (somehow) but I really didnt understand what the global courses getter was doing.