Reflect.deleteProperty( target, propertyKey )
Parameters: This method accept two parameters as mentioned avobe 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.
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
- Internet Explorer