Dear friends of JS development
I assume to a certain level this.greeting also includes me, who would have that only days ago (but I digress)
I am working myself through the advanced JS syntax lessons about objects.
In this lesson, we talk about Setters and Getters
My question is this:
Is it correct that getters allow to retrieve information of an object in an easy way like this
and setters allow to assign information?
The reason I’m asking is that I’m not 100% sure what the advantage of using these approaches is…
Maybe the community can help to un-confuse me