Reflect.deleteProperty( target, propertyKey )
Parameters: This method accept two parameters as mentioned above and described below:
- target: This parameter delete the property and it is the target object.
- propertyKey: This parameter is name of the property which is to be deleted.
Return Value: This method returns a Boolean value which indicates whether the property was successfully deleted.
Exceptions: A TypeError is exception given as the result, when the target is not constructor.
undefined Array [1, 2, 3, 4, 5] Array [1, undefined, 3, 4, 5] Array [1, undefined, undefined, 4, 5]
true false true true
Supported Browsers: The browsers supported by Reflect.deleteProperty() method are listed below:
- Google Chrome 49 and above
- Edge 12 and above
- Firefox 42 and above
- Opera 36 and above
- Safar 10 and above