- When you want to do more beyond getting an object property, you don’t have
to look up and change every accessor in your codebase. - Encapsulates the internal representation.
- You can lazy load your object’s properties, let’s say getting it from a
server.
Bad:
Make objects have private members
This can be accomplished through closures (for ES5 and below).
Good: