The void operator evaluates an expression without returning a value. Although the use of brackets after it is optional, it is good style to use them.
Sam turned <a href="javascript:void(document.bgColor='lightgreen')">green</a>.
The following example creates a hyperlink on the word "green" which, when clicked, changes the background color to light green.