Hi,
I’m struggling to fully grasp the concepts of getters and setters. My understanding is that ‘get’ are methods to return values stored in the object without mutating or altering the values and ‘set’ are methods for altering the values in the object, even though you can alter the values directly.
This exercise instructs us to create getters and setters for each of the _courses but it doesn’t seem like these methods are ever called in the program. My output is correct whether I have the get and set methods or not.
So what’s the purpose?
https://www.codecademy.com/courses/introduction-to-javascript/projects/meal-maker