Java Reference
In-Depth Information
Name
Introduced
Meaning
delete
JavaScript 1.2
delete obj
Deletes an object, one of its properties, or the element of
an array at the specifi ed index. Also deletes variables not
declared with the var keyword.
in
JavaScript 1.4
for (prop in somObj)
Returns true if someObj has the named property.
instanceof
JavaScript 1.4
someObj instanceof ObjType
Returns true if someObj is of type ObjType; otherwise,
returns false.
new
JavaScript 1.0
new ObjType()
Creates a new instance of an object with type ObjType .
this
JavaScript 1.0
this.property
Refers to the current object.
Miscellaneous Operators
The following table lists miscellaneous operators.
Name
Introduced
Meaning
Conditional
operator
JavaScript 1.0
(evalquery) ? v1 : v2;
If evalquery is true , the operator returns v1 ; otherwise it
returns v2 .
Comma
operator
JavaScript 1.0
var v3 = (v1 + 2, v2 * 2)
Evaluates both operands while treating the two as one expres-
sion. Returns the value of the second operand. In this example,
v3 holds the resulting value of v2 * 2.
typeof
JavaScript 1.1
typeof v1
Returns a string holding the type of v1 , which is not evaluated.
void
JavaScript 1.1
void(eva1)
Evaluates eval1 but does not return a value.
Search WWH ::




Custom Search