You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getter: The get syntax binds an object property to a function that will be called when that property is looked up. It can also be used in classes.
Note: You can not pass parameters in get method.
syntax:
get Method_name(){
}
Setter: The set syntax binds an object property to a function to be called when there is an attempt to set that property. It can also be used in classes.
Note: You can pass only one parameters in get method.