File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -885,13 +885,13 @@ using getters and setters to access data on objects is far better than simply
885
885
looking for a property on an object. "Why?" you might ask. Well, here's an
886
886
unorganized list of reasons why:
887
887
888
- 1 . When you want to do more beyond getting an object property, you don't have
888
+ * When you want to do more beyond getting an object property, you don't have
889
889
to look up and change every accessor in your codebase.
890
- 2 . Makes adding validation simple when doing a ` set ` .
891
- 3 . Encapsulates the internal representation.
892
- 4 . Easy to add logging and error handling when getting and setting.
893
- 5 . Inheriting this class, you can override default functionality.
894
- 6 . You can lazy load your object's properties, let's say getting it from a
890
+ * Makes adding validation simple when doing a ` set ` .
891
+ * Encapsulates the internal representation.
892
+ * Easy to add logging and error handling when getting and setting.
893
+ * Inheriting this class, you can override default functionality.
894
+ * You can lazy load your object's properties, let's say getting it from a
895
895
server.
896
896
897
897
@@ -922,11 +922,11 @@ class BankAccount {
922
922
this ._balance = amount;
923
923
}
924
924
}
925
-
925
+
926
926
get balance () {
927
927
return this ._balance ;
928
928
}
929
-
929
+
930
930
verifyIfAmountCanBeSetted (val ) {
931
931
// ...
932
932
}
You can’t perform that action at this time.
0 commit comments