Saturday 25 January 2014

special operators

Javascript supports a number of special operators that do not fit into the operators catagories.
1.       The delete operator
2.       The new operator
3.       The void operator
Delete operator:
The delete operator is used to  delete a property of an object or an element at an array index.
Example:
Delete myArray[5];//deletes the sixth element of myArray;
New Operator
It is used to  create an object .
Example:
A=new Array();
This will create a new JavaScript object of the type array and assign this array to a context area in memory called ‘A’
The void operator

The void operator does not return a value. It is typically used in JavaScript to return a URL with no value.

No comments:

Post a Comment