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.| MDN Web Docs
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.| MDN Web Docs