Object.defineProperty(obj, prop, descriptor)
Parameter: This method accept three parameters as mentioned above and described below:
- Obj: This parameter holds the Object on which user is going to be define the property.
- Prop: This parameter holds the name of a property which is going to be defined or modified.
- Descriptor: This parameter holds the descriptor for the property being defined or modified.
Return Value: This method returns the object which is passed as the argument to the function.
6 4 4 8 8
Supported Browsers: The browsers supported by Object.defineProperty() method are listed below:
- Google Chrome