Statement JavaScript Tutorial

Syntax

void(expression)
    void expression
The void operator is used to evaluate an expression without returning a value.
This operator returns undefined and is commonly used in place of the onClick event handler.
The following example uses the void Operator to Call a Function.


    
      Examples of the void Operator
    
    
    
    
    
    Click here to call the function