---
title: "deleteProperty(_:)"
framework: javascriptcore
role: symbol
role_heading: Instance Method
path: "javascriptcore/jsvalue/deleteproperty(_:)"
---

# deleteProperty(_:)

Deletes the named property from the JavaScript object value.

## Declaration

```swift
func deleteProperty(_ property: Any!) -> Bool
```

```swift
func deleteProperty(_ property: String!) -> Bool
```

## Parameters

- `property`: The name of a property in the JavaScript object value.

## Return Value

Return Value true if property deletion was successful; otherwise, false.

## Discussion

Discussion Calling this method is equivalent to using the JavaScript delete operator on an object (for example, delete object.property). After deletion, attempting to retrieve the property’s value results in the undefined value, and any descriptor information that defines the property’s behavior (see the defineProperty(_:descriptor:) method or the JavaScript defineProperty function) is lost.

## See Also

### Working with Container Values

- [defineProperty(_:descriptor:)](javascriptcore/jsvalue/defineproperty(_:descriptor:).md)
- [hasProperty(_:)](javascriptcore/jsvalue/hasproperty(_:).md)
- [atIndex(_:)](javascriptcore/jsvalue/atindex(_:).md)
- [setValue(_:at:)](javascriptcore/jsvalue/setvalue(_:at:).md)
- [forProperty(_:)](javascriptcore/jsvalue/forproperty(_:).md)
- [setValue(_:forProperty:)](javascriptcore/jsvalue/setvalue(_:forproperty:).md)
- [JSValueProperty](javascriptcore/jsvalueproperty.md)
