Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js why to use getters and setters

1) Syntax reasons. It’s easier and faster to read code 
created with accessor functions
2) Encapsulation. I can create safer code with accessor functions.
Source by python-course.eu #
 
PREVIOUS NEXT
Tagged: #js #getters #setters
ADD COMMENT
Topic
Name
9+3 =