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 expressionSpecial operator allows us to return the undefined type from an evaluated expression.

Parameter Description
expressionThe 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));

Press the button below to action the above code:


Related Tutorials

General use.

go to home page Homepage go to top of page Top