Object.delete

Object.delete

Object.delete

Function

Delete the specified key.

Syntax

Parameters

ParametersTypeRequiredDefault valueDescription
keyAnyNo''The key name to be deleted will be converted to a string first when called.

Return value

TypeDescription
BoolReturns true if the deletion is successful; returns false if the key does not exist.

Example

Notes

  • This method modifies the original object.