Asp.net programming we consider all important topic for knowledge about controls,web Services, JSON, Ajax, database, and interview related Question. In this Asp.net and sql server tutorial blog we give many examples of jquery as like How Play YouTube Video in Your Asp.net Website by URL, How to Play YouTube Videos in Asp.net by using Jquery , Jquery Change div background on mouseover in asp.net , JQuery UI Datepicker (Calendar) etc.

Tuesday, December 30, 2014

What is delete operator in javascript

What is delete operator :



delete operator:

The delete operator removes a property from an object.

Syntax of delete operator:

delete <expression >

where expression should evaluate to a property reference, e.g.

The delete operator use to remove the property of object.

delete object['property']

Parameters of delete operator:


  • object:The name of an object, or an expression evaluating to an object.
  • property:The property to delete.
  • Returns:Throws in strict mode if the property is an own non-configurable property (returns false in non-strict). Returns true in all other cases.



Description of delete operator :

Unlike what common belief suggests, the delete operator has nothing to do with directly freeing memory (it only does indirectly via breaking references. See the memory management page for more details).

If the delete operator succeeds, it removes the property from the object entirely. However, if a property with the same name exists on the object's prototype chain, the object will inherit that property from the prototype.

delete is only effective on an object's properties. It has no effect on variable or function names.

While sometimes mis-characterized as global variables, assignments that don't specify an object (e.g. x = 5) are actually property assignments on the global object.


No comments:

Post a Comment