Home » JavaScript handler deleteProperty() Method

JavaScript handler deleteProperty() Method

by Online Tutorials Library

JavaScript handler.deleteProperty() Method

The handler.deleteProperty() method used to remove the property entirely using the delete operator. This method returns true if the delete was successful.

Syntax

Parameters

Target: The target object.

Property: The name of the property to delete.

Return value

This method returns a Boolean value. It indicates that property successfully deletes or not.

Browser Support

Chrome 49
Edge 12
Firefox 18
Opera 36

Example 1

Test it Now

Output:

Called: abc  

Example 2

Test it Now

Output:

In delete Property undefined   

Example 3

Test it Now

Output:

true false true  

Next TopicJavaScript handler

You may also like