[Contents] [Previous] [Next] [Index]

delete

Deletes an object's property or an element at a specified index in an array.

Implemented in

Navigator 4.0, Netscape Server 3.0

Syntax

delete objectName.property
delete objectName[index]
delete property

Arguments

objectName
An object from which to delete the specified property or value.

property
The property to delete.

index
An integer index into an array.

Description

If the delete operator succeeds, it sets the property of element to undefined; the operator always returns undefined.

You can only use the delete operator to delete object properties and array entries. You cannot use this operator to delete objects or variables. Consequently, you can only use the third form within a with statement, to delete a property from the object.


[Contents] [Previous] [Next] [Index]

Last Updated: 10/31/97 12:29:59


Copyright © 1997 Netscape Communications Corporation