void

The void operator is used to perform an evaluation of an expression, but with no value being returned. It is used most commonly, if at all, as a JavaScript alternative to an event handler within an HTML tag.

syntax:

void expression

void (expression)

EXAMPLE

function functionOne() {

alert("The void operator worked!!");

}

You then include the following line in an HTML tag. The anchor tag is used in this example.

Click This Text to Display the Alert Box

The browser parses the text, then displays the alert box. Simple.