Run ❯
Get your
own
website
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
JavaScript Objects
The Object.defineProperty() Method
This example uses the defineProperty() method to add a getter and a setter.