Hello @pycoder84798, welcome to the forums! From what I’ve read/seen, you’re completely right. The
setters don’t play a role in the final code. I think you just create them to practise creating them.
I recall in one of the lessons it said that getters & setters shouldn’t have the same name as properties. Doing this project made me realize why— the instructions say to name our setters the same as the properties. Because of this, my getters & setters weren’t being used at all… but when I changed the
desserts properties to private properties (e.g.
_appetizers, etc), they worked. Now when I used
this.appetizers = dish , it referenced the setter method rather than directly mutating the
Hope this all makes sense & helps!