void
special operatorS2C Home « Operators « void
Defer to undefined
.
Description
The void
special operator allows us to return the undefined
type from an evaluated expression.
Syntax
Signature | Description |
---|---|
void expression | Special operator allows us to return the undefined type from an evaluated expression. |
Parameter | Description |
---|---|
expression | The evaluated expression to evaluate. |
Returns
The undefined
global variable type.
Example
The code gives an example of using the void
special operator.
// Using the void special operator.
alert(2*2);
alert(void(2*2));
Related Tutorials
General use.